JazzyViewPager icon indicating copy to clipboard operation
JazzyViewPager copied to clipboard

Memory leak

Open kurtism opened this issue 12 years ago • 4 comments

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); }

kurtism avatar Feb 13 '13 06:02 kurtism

Same for me.

riwnodennyk avatar Nov 06 '13 16:11 riwnodennyk

Thanks so much for the solution, this solved my out of memory issues.

matthewrice345 avatar May 04 '14 23:05 matthewrice345

Thanks!!

Avivbs avatar Jul 06 '14 15:07 Avivbs

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.

yrizk avatar May 07 '15 14:05 yrizk