What does “runs on UI thread” for onPostExecute() really mean?

1 Answers

It will crash in onPostExecute() because of UI thread like a process Dialog. It happens to me, my Activity destroy before my Asynctask completes. It says "window leaked....." So, I remove onPostExecute(). No more crash..

Consider an AsyncTask started in an Activity. What happens if the Activity is paused or destroyed? Will onPostExecute() run? If yes, what UI thread will be used?

Just wondering.

Many thanks in advance.