Skip to content Skip to sidebar Skip to footer

Android Bitmaps, Recycling, And Heap Fragmentation

I have an app that makes heavy use of bitmaps read in from the SD card. I'm 99% sure my app is never destroyed without recycling these. They are all allocated into an LRU cache (co

Solution 1:

You say that you recycle them in onDestroy(), but perhaps you should recycle them in onPause()? I've run into some out of memory issues when switching orientation and the issue was solved by doing recycling in onPause().

Just a thought. Not sure if that'll solve your issue.


Post a Comment for "Android Bitmaps, Recycling, And Heap Fragmentation"