title: OutOfMemoryError: Android large Bitmap rotation (90°)
body: <p>I have a big Memory Problem:</p>
  
  <pre><code>// in sourceImage is a big JPEG previously loaded
  Matrix mat = new Matrix();
  mat.postRotate(90);
  Bitmap rotatedImage = Bitmap.createBitmap(sourceImage, 0, 0, sourceImage.getWidth(), sourceImage.getHeight(), mat, true);
  </code></pre>
  
  <p>Always i Run this code, my App crashes and says "VM won't let us allocate xxxxxx bytes"</p>
  
  <p>Can you help me?</p>
  
  <p>Edit:</p>
  
  <p>I saw much similar questions here, but i don't know how to recycle the sourceImage before rotatating it... (cause the second instance is to big to hold it at the same time)</p>
  
  <p>Thanks.</p>