Reputation: 5085
From another stackoverflow question, it seems that Android handles large bitmaps differently than other memory. It also seems like there is a way to force Android to recycle the bitmaps to free up memory. Can anyone enlighten me on how to do this.
My application uses 2-6 huge bitmaps at all times, so it nearly kills the phone's memory when running, and I want to clear it up when the user quits.
Upvotes: 2
Views: 2891
Reputation: 4112
Check answer in this post how to compress image for imageview in android you can extract thumbnails of your images and use them as bitmap. After calling bitmap.recycle() you can use System.gc(); to call the garbage collector
Upvotes: 0
Reputation: 439
Be sure if anybody is not using the Bitmap before call the method recycle(). If anybody is using the Bitmap and you try recycle, one exception is call.
Upvotes: 0