I would tend to disagree with the above two explanations.  Let's say
you implement onStop() to stop/kill the thread you created in
onStart().  You then navigate to a new activity by starting it.  Your
activity gets paused.  Android can 'finish' your activity at this
point, WITHOUT killing the process.  There is nothing in the
documentation that says the process HAS to be killed if your activity
is finished prematurely due to memory.  Android could reclaim the
memory by simply disposing of your paused Activity before showing the
next activity that you just started, without killing the process.  In
that case, the thread you started in onStart will still be running.

I think it makes much more sense for the documentation to clarify
this, and recommend that people do all auxiliary setup/cleanup in
onResume/onPause, and nowhere else.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to