title: Memory used by ImageView is never released
body: <p>While building a Dialog which loads content view layout (setContentView)
  I have noticed a weird thing:
  The loaded layout has an ImageView with background of this Dialog:</p>
  
  <pre><code>&lt;ImageView android:layout_width="match_parent"
             android:layout_height="match_parent"
             android:src="@drawable/preloader_bg_small"
              android:id="@+id/background_img"
          /&gt;
  </code></pre>
  
  <p>Each time the dialog shows (in different activities) it drains memory (30mb) the image itself is 290k jpg loaded from local resource and NEVER gets released</p>
  
  <p>I have tried to load the image programmatically:</p>
  
  <pre><code>((ImageView)dialog.findViewById(R.id.background_img)).setImageResource(R.drawable.preloader_bg_small);
  </code></pre>
  
  <p>and then unloading it before the dismiss on the dialog</p>
  
  <pre><code> ((ImageView)dialog.findViewById(R.id.background_img)).setImageDrawable(null);
  </code></pre>
  
  <p>But then the memory gets released only after the activity is closed and not immediately.</p>
  
  <p>Is there a way releasing the memory?
  Why is ImageView behaves this way?</p>
  
  <p>Thanks for help!</p>