Android Activity leak in very simple setup
<p>I have a system of 2 ridiculously simple Activity objects - MainActivity starts TestActivity, which has a very large image on it. When in TestActivity, i press back button and get back to MainActivity, however my memory (about 45-50m) doesn't get GCed. Any ideas?</p>

<p><a href="https://i.stack.imgur.com/neV2a.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/neV2a.png" alt="Leak"></a></p>

<p><a href="https://i.stack.imgur.com/giRpg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/giRpg.png" alt="enter image description here"></a></p>

<p>MainActivity.java</p>

<pre><code>            public class MainActivity extends Activity {

            @Override
            protected void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);
                setContentView(R.layout.activity_main);

                Intent intent = new Intent(this, TestActivity.class);
                startActivity(intent);
            }
        }
</code></pre>

<p>TestActivity.java</p>

<pre><code>    public class TestActivity extends Activity {

        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_test);
        }


        @Override
        public void onBackPressed() {
            super.onBackPressed();
        }


    }
</code></pre>

<p>MainActivity layout    </p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.leaked.leaked.MainActivity"&gt;

    &lt;TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hello World!" /&gt;
    &lt;/RelativeLayout&gt;
</code></pre>

<p>TestActivity layout</p>

<pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
    &lt;FrameLayout android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_centerVertical="true"
        android:layout_centerHorizontal="true"
        xmlns:android="http://schemas.android.com/apk/res/android"&gt;

        &lt;ImageView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:src="@drawable/earth_poster_large"/&gt;
    &lt;/FrameLayout&gt;
</code></pre>

<p>AndroidManifest.xml</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.leaked.leaked"&gt;

    &lt;application&gt;
        &lt;activity
            android:name=".MainActivity"
            android:screenOrientation="portrait"&gt;
        &lt;intent-filter&gt;
            &lt;action android:name="android.intent.action.MAIN" /&gt;

            &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
        &lt;/intent-filter&gt;
        &lt;/activity&gt;
        &lt;activity android:name=".TestActivity"&gt;
        &lt;/activity&gt;
    &lt;/application&gt;

&lt;/manifest&gt;
</code></pre>