When should i cancel/kill a thread?
<p>I created a Thread inside an Activity. At first, i thought that when <code>onDestroy()</code> is called on the Activity, then the thread will be killed also. But i was wrong. The Thread still continued running.</p>

<p>So i decided to cancel the thread inside the <code>onDestroy()</code> method. Everything works fine.</p>

<p>But there's 1 problem : <code>onDestroy()</code> is not guaranteed to be called. For example : the Activity is killed abruptly by the OS. </p>

<p>So what's the best thing to do in this case ? Thanks.</p>
