Once an AsyncTask call is finished is the thread deleted?
I stored an AsyncTask in a var “guiThread = (GUIAsyncTask) new GUIAsyncTask()”.
The first call to execute() works but subsequent calls don’t.
So, do I just create new tasks whenever I need them? I was under the impression that I used my variable over and over and calling new over and over would spin up thousands/millions of threads.
AsyncTasksare one-time uses. They start, execute, then die. Then you have a choice of keeping the reference around to gather information from it that may be stored in the class post-execute, or dumping the reference and letting the garbage collector handle it. If you want to start theAsyncTaskagain, you have to create a new object and start it.