Will this code from Android SDK sample cause a memory leak of the parent Activity?
<p>So from reading/research about memory leaks it suggests to make all inner classes static to avoid memory leaks.  However, by looking at the SDK samples (specifically TicTacToeLib) they implement their callbacks without the use of static inner classes. Will this cause a memory leak? If not, why?</p>

<pre><code>private Handler mHandler = new Handler(new MyHandlerCallback());


private class MyHandlerCallback implements Callback {
        public boolean handleMessage(Message msg) {
            if (msg.what == MSG_COMPUTER_TURN) {

                // Pick a non-used cell at random. That's about all the AI you need for this game.
                State[] data = mGameView.getData();
                int used = 0;
                while (used != 0x1F) {
                    int index = mRnd.nextInt(9);
                    if (((used &gt;&gt; index) &amp; 1) == 0) {
                        used |= 1 &lt;&lt; index;
                        if (data[index] == State.EMPTY) {
                            mGameView.setCell(index, mGameView.getCurrentPlayer());
                            break;
                        }
                    }
                }

                finishTurn();
                return true;
            }
            return false;
        }
    }
</code></pre>
