On Sun, Feb 10, 2013 at 9:35 AM, dashman <[email protected]> wrote:
> I understand Activities can be paused and or destroyed
> when in the background or sleeping.

Activities are paused when they move to the background. Activities are
only called with onDestroy() when in the background as part of Android
terminating the process, and it is not guaranteed that onDestroy()
will be called.

> What happens to the Application object.
>
> Specifically - if the Activity is destroyed, is the Application
> object destroyed also.

The Application object is not called with onTerminate(). It simply
vanishes into the ether when the whole process does.

> And there doesn't seem to be a guarantee of getting called
> when the Application object IS destroyed.

It is guaranteed that you will not be called. The Application object,
at best, is the same as static data members: use them for a cache,
nothing more.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 4.5 Available!

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to