Is there a way to reliably terminate my supporting threads when my application is destroyed, particularly in the case Activity.onDestroy() never gets called?
Suppose when my application starts up it creates separate threads using the Thread class to run support tasks (game update, path finding, AI, asset loading, whatever). 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. My thinking right now is that I have to terminate the threads during onPause() and recreate them if the activity resumes. AsyncTask does not seem right for repeated per-frame tasks like this, unless I misunderstand its intended uses. My thanks for any tips or pointers to helpful documentation. -- 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

