Even though you are de-referencing the image view, there still may be
a reference in the Activity itself.  Try using this instead:

iv = new ImageView(Context.getApplicationContext() );

I think you're creating a new image, while maintaining the reference
to the old image(s) every time you change views.

There is a good write up on this here:
http://www.curious-creature.org/2008/12/18/avoid-memory-leaks-on-android/

Let me know if it helps.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to