Hi all. I have a list adapter, code given below.

I'm trying to clean up the app, recycle bitmaps etc, to lower the
memory usage as I've been experiencing out of memory issues when
creating bitmaps. I'm concerned that my list adapter is not as
efficient as it could be, and just wanted some advice.

1) As I scroll up and down the list, I notice that getView() gets
called each time the item appears. Thus, it creates another ImageView
which gets assigned another bitmap. Is there not a way to have this
only called the once, so that the next time the list row is called,
it's already instantiated and doesn't need to re-inflate the layout?

2) Once my activity finishes, is there a way I can access the
ImageView items created by the list adapter, and clean them all up? By
this I mean, set the image resource to null, so no bitmaps are still
being referenced.


Thanks for any advice here.

-- 
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

Reply via email to