Its process is just outright killed.  In your second launch, the process had
been killed, so it needed to be restarted and thus a fresh instance of the
activity created inside of it.

On Fri, Sep 11, 2009 at 3:04 PM, WoodManEXP <[email protected]> wrote:

>
> Why does app not get onDestroy when exited but then receives an
> onCreate when relaunched?
>
> Here is the trace
>
> Launched app
>
> It received onCreate and the other expected on calls for a launch.
>
> Now, leave application with the home button and it receives
>
> onSaveInstanceState
> onPause
> onStop
>
> And returns to the main Android screen (the one with Google Search at
> the top)
>
> Launch the app again and it receives
>
> onCreate
> onStart
> onResume
>
> The docs say onCreate is “Called when the activity is first created.”
> But here it is never destroyed but created again.
>
> There are many objects that never got GC’ed because the app was not
> onDestroyed?
>
> Is this a memory leak? What have I missed? Or should I assume that
> onCreate can be recalled for an already created app.
>
> (probably just confused…)
>
>
>
> >
>


-- 
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, and so won't reply to such e-mails.  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