On Mon, Oct 11, 2010 at 5:41 PM, A Curious Developer <[email protected]> wrote:
> The Dev Guide states this: "For example, if it has a thread running in
> the background to download data from the network, it may create that
> thread in onCreate() and then stop the thread in onDestroy()", but
> what if onDestroy() never gets called? It seems like the thread would
> live on after the application is destroyed.

If onDestroy() is not called, the process is being terminated, which
flushes all the process' threads along with it.

> My thinking right now is that I have to terminate the threads during
> onPause() and recreate them if the activity resumes.

That may be good for other reasons, such as not consuming CPU time
while your app is not in use.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training...At Your Office: http://commonsware.com/training

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