Hurry up release of source bitmap in rotations
authorDavid A. Velasco <dvelasco@solidgear.es>
Wed, 10 Dec 2014 11:48:31 +0000 (12:48 +0100)
committerDavid A. Velasco <dvelasco@solidgear.es>
Wed, 10 Dec 2014 11:48:31 +0000 (12:48 +0100)
src/com/owncloud/android/utils/BitmapUtils.java

index d87f9bd..7036727 100644 (file)
@@ -159,6 +159,9 @@ public class BitmapUtils {
             
             // Rotate the bitmap
             resultBitmap = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true);
+            if (resultBitmap != bitmap) {
+                bitmap.recycle();
+            }
         }
         catch (Exception exception)
         {