Thank you for this interesting information, hackbod.

> - The android system outright kills a processes when it needs more
> memory elsewhere, no less than your task manager would be killing a
> process if you request it.  We don't kindly ask a process to go away
> and assume it is well behaved and will respect that, we just kill it
> dead.

That's what I currently do with System.exit(0) at the end of my
onDestroy() even before the android system gets to killing the process
for me, because my app leaks some memory upon restarting it after use
of the back button. Despite the fact that it is is not a big leak (say
50 KB per run), and despite the fact that my app does not use more
than at most say 4 MB (far less than the 16 MB heap), it still gives
OutOfMemoryError's and crashes or even hangs the camera until a power-
cycle after just three runs or so if I do not preemptively kill the
process myself in onDestroy(). I've no idea where the missing 12 MB
are as it never shows up in DDMS. I tried to make variables and
functions non-static wherever I could, but no luck. Do you have any
good advice on how to track down and solve such elusive problems?
There may well still exist weak references that I am simply not aware
of that keep things in memory, but is there any means to help make one
aware of where the root causes are? I just cannot see what objects the
OS is hanging on to outside my own app, which is pretty frustrating.

Thanks


On Jan 28, 6:23 am, Dianne Hackborn <hack...@android.com> wrote:
> In general, just going through a couple heavy applications (web browser,
...
--~--~---------~--~----~------------~-------~--~----~
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