I'm experiencing a bunch of wacky (and very hard to find) memory leakage in my Android app. I don't have any static Bitmaps (which is what all the tutorials regarding leaking Bitamps tell you not to do). I do however, have a Bitmap that I'm storing in my Application class which is being used by a bunch of my activities. I AM calling recycle()
on that when the last activity exits, but I'm wondering if it would be safer to just store the data as a byte[]
and create a Bitamp out of it locally in each Activity that uses it, and then release it as soon as it's done. I'm curious of byte[]
is construct that the VM has an easier time garbage collecting than the Bitmap (which it seems to totally suck at).
All help GREATLY appreciated.