Proper way to know whether an Activity has been destroyed
<p>May I know what is the proper way to know whether an Activity has been destroyed? Currently, I am using the following way.</p>

<pre><code>private volatile boolean isOnDestroyCalled = false;

@Override
protected void onDestroy() {
    super.onDestroy();
    isOnDestroyCalled = true;
}

public boolean isOnDestroyCalled() {
    return this.isOnDestroyCalled;
}
</code></pre>

<p>Is there any other way better than the above?</p>
