On Tue, Jan 13, 2009 at 12:27 PM, iliketolearn <[email protected]> wrote:

> When the system is running low on memory, can it selectively choose to
> destroy an activity in the process, instead of the entire process?


Currently it relies on killing the entire process, but this could change in
the future.


> For
> example, if a process has a service and a non-visible activity running
> within, does the OS destroy only the activity, letting the process
> with the service continue to live? Or, should I assume that when the
> OS destroys an activity, it destroys the entire process?


If you have a service running in the process, it will avoid killing the
process.


> Also, when an activity is destroyed (either by calling finish() or by
> the system), does everything get GC'd regardless if the variables are
> public, private, static, etc?


Yes as long as there are no other references on the object.

-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.

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