"* onDestroy() is not guaranteed to be called, so if you create a Thread in onCreate(), the thread may never be stopped. *" When the process hosting your activity is killed, the onDestroy won't be called... makes sense.. your process just died. The process is force-killed (I think): any thread that may be running, daemon or not, will die with its process.
The same goes for onStop. The onStop isn't called when the process hosting your app is killed. Take a look at the diagram in the "Implementing the lifecycle callbacks" section of the link you provided. You'll see that after onPause and onStop the process can be killed. Any open resources (threads, cursors, etc) will die with the process when it's killed. In other words: Your process won't be killed until all its activities are at least paused (after their onPause have been called). To allow you to clean up unnecessary resources at appropriate times,* while your process keeps running in the background*, you can implement onStop, onDestroy and such. -- 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