title: AnimationDrawable memory usage
body: <p>I have an application where the first activity displays a loading animation, and it seems to increase the memory usage dramatically - with the animation the app is using around 30MB, and without it less than 10MB.</p>
  
  <p>The relevant code is as follows:</p>
  
  <pre><code>public void onCreate(Bundle savedInstanceState) 
  {
       super.onCreate(savedInstanceState);
       setContentView(R.layout.load_application);
       StartLoadingAnimation();
  }
  
  private void StartLoadingAnimation()
  {
      frameAnimation = new AnimationDrawable();
      for(int i = 1; i &lt;= 64; i++)
      {
          String index = i &lt; 10 ? "00" + i : "0" + i; 
          int frameIdentifier = getResources().getIdentifier("loading_icon_" + index, "drawable", getPackageName());
          frameAnimation.addFrame(getResources().getDrawable(frameIdentifier), 70);
      }
  
      ImageView imageCafeLoading = (ImageView) findViewById(R.id.ImageCafeLoading);
      imageCafeLoading.setBackgroundDrawable(frameAnimation);
      imageCafeLoading.post(new LoadingImageStarter());
  }
  
  /** Starting the loading image animation */
  private class LoadingImageStarter implements Runnable 
  {
         public void run() 
         {
              frameAnimation.setOneShot(false);
              frameAnimation.start();
         }
  }
  </code></pre>
  
  <p>It seems like finishing the activity when navigating to the next one doesn't matter, the memory usage is still much higher with the animation.</p>
  
  <p>How can I release this memory when navigating away from the activity or destroying it?</p>