title: Does recycling a bitmap affect other copies of it in memory?
body: <p>I'm resizing an array of bitmaps.  Although the array loads fine (indicating there's enough memory to hold it) when I resize (shrink) the bitmaps stored in the array I encounter an OutOfMemory error.  Here's the code that resulted in running out of heap:</p>
  
  <pre><code>for (int i=0;i&lt;2;i++) {
      for (int j=0;j&lt;427;j++) {
        frameSet[i][j] = Bitmap.createScaledBitmap(frameSet[i][j],128,128,true);
      }
  }
  </code></pre>
  
  <p>In an attempt to fix the problem I created a temporary bitmap, and added a recycle() call:</p>
  
  <pre><code>for (int i=0;i&lt;2;i++) {
      for (int j=0;j&lt;427;j++) {
          tempFrameResize = Bitmap.createScaledBitmap(frameSet[i][j],128,128,true);
          frameSet[i][j] = tempFrameResize;
          tempFrameResize.recycle();
      }
  }
  </code></pre>
  
  <p>This corrects the OutOfMemory error, but the contents of frameSet are no longer correct (i.e. they appear to be all white, as if the contents of the bitmap were cleared).  Does it make sense that my recycle call, called after the contents of tempFrameResize have been passed into frameSet, would affect the contents of frameSet?  That seems to be what's happening.</p>