views:

359

answers:

1

I am firing off an AsyncTask to fetch images via HttpClient.

Via DDMS in eclipse, the view shows that the AsyncTask runs and then hangs around.

This is a screenshot of the DDMS threads view.

Should the AsyncTask #1 thread disappear or is it benign ? What does the status wait mean anyway ?

+1  A: 

If you're really worried, over ride onPostExecute like this

 protected void onPostExecute(Long result) {
     showDialog("I am finished");
 }

If your thread is finished, you don't have to worry about it. It's in Android's hands now.

I suspect what's happening is your thread is done but Android doesn't reclaim the memory because it doesn't need it yet.

Whaledawg
More specifically, AsyncTask uses a thread pool, so those threads will sit in the pool until the process is closed.
CommonsWare