Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/android/src/com/artifex/mupdf/BitmapHolder.java b/android/src/com/aindex 244d5d6..860260e 100644
- --- a/android/src/com/artifex/mupdf/BitmapHolder.java
- +++ b/android/src/com/artifex/mupdf/BitmapHolder.java
- @@ -10,6 +10,8 @@ public class BitmapHolder {
- }
- public synchronized void setBm(Bitmap abm) {
- + if (bm != null && bm != abm) {
- + bm.recycle();
- bm = abm;
- }
- }
- diff --git a/android/src/com/artifex/mupdf/MuPDFCore.java b/android/src/com/artiindex 15c90e1..ef1c17a 100644
- --- a/android/src/com/artifex/mupdf/MuPDFCore.java
- +++ b/android/src/com/artifex/mupdf/MuPDFCore.java
- @@ -121,6 +121,8 @@ public class MuPDFCore
- int patchX, int patchY,
- int patchW, int patchH) {
- gotoPage(page);
- + // Clear the reference out before creating the new bitmap
- + h.setBm(null);
- Bitmap bm = Bitmap.createBitmap(patchW, patchH, Config.ARGB_8888 drawPage(bm, pageW, pageH, patchX, patchY, patchW, patchH);
- h.setBm(bm);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement