Explorar el Código

Hurry up release of source bitmap in rotations

David A. Velasco hace 10 años
padre
commit
154188c38f
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      src/com/owncloud/android/utils/BitmapUtils.java

+ 3 - 0
src/com/owncloud/android/utils/BitmapUtils.java

@@ -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)
         {