I believe Java heap GC is triggered by various characteristics of the Java heap.

If you don't have a lot of Java objects, there may not be anything to cause those soft references to be collected. In the meanwhile, the native heap may overflow.

I suspect it's one of the reasons why HC puts bitmap data in the same heap as Java objects.

You could try calling System.gc yourself at various points, see if this helps.

-- Kostya

27.04.2011 22:24, dnkoutso ?????:

I do have my images in an HashMap>. From the SoftReferences definition I would expect the Drawables to be GC'ed if memory is not enough.

In contrast, from my previous research I see that the bitmap in the drawable is allocated in a different heap (the native heap) than my applications heap. That explains why on DDMS despite the fact I see 6MB of memory I am using, my app still crashes.



--
Kostya Vasilyev -- http://kmansoft.wordpress.com

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