ImageAdapter and ListView (java.lang.OutOfMemoryError: bitmap size exceeds VM budget)

Posted by theDude on Stack Overflow See other posts from Stack Overflow or by theDude
Published on 2010-06-15T23:34:20Z Indexed on 2010/06/15 23:42 UTC
Read the original article Hit count: 253

Filed under:
|

Hi,

I'm using ListView to display images which I provide through an ImageAdapter class. it works great on my device (and on many other devices which I tested it on), but somehow when I'm using the emulator and I'm long-pressing the up/down button - I'm getting an outOfMemory error after 10-15 seconds.

I tried clearing cache, canceling cache, etc. - nothing helped.

I know this crash is pretty rare (i couldn't reproduced it on any "real" device), but I can see on DDMS that "GC freed" are getting bigger during that long press and I can't find a way to clear them.

Any help will be appreciated, Tnx.

© Stack Overflow or respective owner

Related posts about android

Related posts about outofmemory