I guess the 'this' value of the activity of the second onCreate is
different than the 'this' value of the onDestroy after that. It looks
like a new activity is created first and then the old one is
destroyed. The fact that onDestroy is not called when you hit Back
could be OK (when you show the activity again, onResume could be
called), but the fact that a new one is generated and then the old
one's onDestroy is called does not look good. I'm going to check this
out on my apps.


On Mar 10, 12:08 pm, Alex <[email protected]> wrote:
> I posted in another thread, but I'll try here as well:
>
> I'm having a similar lifecycle issue on the Nexus One.
>
> Start the app ->OnCreate
> Hit back -> no OnDestroy is called
> Run app again ->OnCreate, followed by OnDestroy
>
> The wierd thing is that it doesn't actually kill our application, so
> it is left in a broken state since we are tearing things down in
> OnDestroy.
>
> -Alex
>
> On Feb 6, 2:22 pm, Bob Kerns <[email protected]> wrote:
>
>
>
> > Is the entire application disappearing, or is it just this activity?
> > onDestroy() doesn't necessarily get called in the former case.
>
> > On Feb 6, 1:31 am, sdphil <[email protected]> wrote:
>
> > > I recently got theNexusOneUpdate which provides amongst other
> > > things - pinch gestures.
>
> > >Oneother unlucky surprise I got is that the app I am writing behaves
> > > differently.  When I call finish() my activity's onDestroy() should be
> > > getting called.  On 1.5, 1.6, 2.0 and 2.1 (before thenexusupdate)
> > > this works fine, but on 2.1 with theNexusOneit just doesn't call
> > > onDestroy.  I have a button ononeof the activity pages that when you
> > > click it, it is supposed to "finish" the activity and I verified it's
> > > calling finish(), but onDestroy() never gets called.
>
> > > thoughts?
>
> > > tia.- Hide quoted text -
>
> - Show quoted text -

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