JazzyViewPager
JazzyViewPager copied to clipboard
Memory leak
My project make with this library has memory leak
and i fix that below some code
add method at JazzyViewPager.java
public void delObjectForPosition(int position) { mObjs.remove(Integer.vauleOf(position)); }
and modify my pageradapter
@Overrid public void destoryItem(View container, int position, Object obj) { jazzPager.removeView(View)obj); jazzPAger.delObjectForPosition(position); }
Same for me.
Thanks so much for the solution, this solved my out of memory issues.
Thanks!!
I think its worth noting that this memory issue depends on what your pager adapter is. FragmentStatePagerAdapter only keeps one view at a time, so if I'm not mistaken, you wouldn't run into a memory issue then, as opposed to FragmentPagerAdapters.