ailinykh wrote:
> What do mean by "when all components of an Android application are
> destroyed"?
> Let's talk about Activity, for example. Does "destroy Activity" means
> unload Java class?

No, I mean destroyed, as in onDestroy().

> If so, what happens when system tries to destroy activity but it is
> referenced by another object ( for instance, a singleton may keep
> reference to it) ?

The component is destroyed from an Android standpoint, but the Activity
will not be garbage collected. This results in a memory leak and is why
mutable static data members should be avoided where possible.

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

Android App Developer Books: http://commonsware.com/books

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