Thank you,
  Mark!

> > First at all singleton could be a member of the application. Then it
> > will garbage collected with application.
>
> Then it is not a singleton. It is a data member of Application.
>
Sorry, I wasn't precise.

> > As far as I
> > understand one process runs one application.
>
> At a time, yes.
>
> However, when all components of an Android application are destroyed,
> the process is retained for a while in a pool, for reuse by another
> application. This saves CPU time and battery life, by avoiding forking a
> new process and setting up a new Dalvik VM.
>
I see. Now it becomes more clear. One more related question.
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?
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) ?

Andrey

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

To unsubscribe, reply using "remove me" as the subject.

Reply via email to