15.02.2011 13:50, cool.manish пишет:
I am storing some data at application level, I want to clear it so
that it doesn't consume memory when my application is in background.

From what I can find in the documentation, it's not clear if this can reduce memory consumption.

An application sitting in the background is presumably not running any code and not making allocations, so there is nothing to trigger garbage collection (and cause the heap allocated by Dalvik VM from the Linux kernel to shrink).

Later, if Android runs out of global memory, it's documented that it just starts killing background processes in their entirety. It's not documented that there is any attempt to run garbage collection on background applications' heaps and shrink them to free up global memory.

Perhaps this (garbage collection on background applications) actually does happen but just isn't documented, then freeing memory before going into the background is a useful thing.

Can this be clarified?

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