Thank you very much-  I did a lot more work on this after posting my
question here and I found this excellent guide on troubleshooting
Android memory leaks
http://ttlnews.blogspot.com/2010/01/attacking-memory-problems-on-android.html

The MAT plugin for eclipse mentioned in that article is the kind of
tool I was looking for and really helped me sort out the problem I was
having.

In short, other than my Bitmap issues, which were solved by
doing .release() and set to null on any Bitmap when I'm done using
it...   our application had some leaks due to passing some objects by
hard reference through the Application instance.   The objects in
question had several Bitmap references, and using the MAT tool I was
able to see that this was linking all the way back to a List<> of
similar objects in a previous activity.  So GC was not collecting on a
lot of things because of that.   I solved it by doing a shallow copy
of the objects in the Activity they were passed to, and then nulling
out the reference in the application context.

I would have posted some relevant code in my original question, but
the application is pretty complicated and at the time I wrote my
question, I wasn't even sure what portions were relevant to my
problem ;)

Thanks!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to