It seems that there my be a bug, memory leak with the BitmapFactory when decoding, and reading bitmaps from file. I, and many other developers have noticed similar problems to what you describe. I haven't been able to get any official confirmation that this is a known bug, but it looks like a bug to me. I have been able to mitigate this problem in my code by using bitmap.recycle and object pooling, but I have not been able to get rid of this problem entrirely.
Mark On Jan 23, 3:48 am, ad <avra...@gmail.com> wrote: > I've problem with memory of the bitmaps, > I'm creating a lot of bitmaps and then releasing them by recycle() and > after many retries I get: > > java.lang.OutOfMemoryError: bitmap size exceeds VM budget > > How to get rid of this??? > The problem is that even if i close the activity (call onDestroy()), > in next program run the bitmap memory is still allocated!!!! (I've > also android:clearTaskOnLaunch="true" in my manifest). > This is horrible. Can anybody help me with that? > I suspect that every application using BitmapFactory.decodeResource > must get this exception in some call! > Do you have any idea what's going on? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---