AsyncTask won't stop even when the activity has destroyed
<p>I have an AsyncTask object which starts executing when the activity is created and does stuff in the background (downloads upto 100 images). Everything works fine but there is this peculiar behavior which i'm not able to understand. </p>

<p>For eg: when the android screen's orientation changes then the activity is destroyed and created again. So I override the onRetainNonConfigurationInstance() method and save all the downloaded data executed in the AsyncTask. My purpose of doing this is to not have AsyncTask run each time activity is destroyed-created during orientation changes, but as i can see in my logs the previous AsynTask is still executing. (The data is saved correctly though)</p>

<p>I even tried to cancel the AsynTask in the onDestroy() method of the activity but the logs still show AsynTask as running.</p>

<p>This is really strange behavior and would really be thankful if someone can tell me the correct procedure to stop/cancel the AsynTask.</p>

<p>Thanks</p>
