Advertisement
Guest User

Untitled

a guest
Jan 10th, 2013
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff --git a/android/src/com/artifex/mupdf/BitmapHolder.java b/android/src/com/aindex 244d5d6..860260e 100644
  2. --- a/android/src/com/artifex/mupdf/BitmapHolder.java
  3. +++ b/android/src/com/artifex/mupdf/BitmapHolder.java
  4. @@ -10,6 +10,8 @@ public class BitmapHolder {
  5. }
  6.  
  7. public synchronized void setBm(Bitmap abm) {
  8. + if (bm != null && bm != abm)
  9. + bm.recycle();
  10. bm = abm;
  11. }
  12.  
  13. diff --git a/android/src/com/artifex/mupdf/MuPDFCore.java b/android/src/com/artiindex 15c90e1..ef1c17a 100644
  14. --- a/android/src/com/artifex/mupdf/MuPDFCore.java
  15. +++ b/android/src/com/artifex/mupdf/MuPDFCore.java
  16. @@ -121,6 +121,8 @@ public class MuPDFCore
  17. int patchX, int patchY,
  18. int patchW, int patchH) {
  19. gotoPage(page);
  20. + // Clear the reference out before creating the new bitmap
  21. + h.setBm(null);
  22. Bitmap bm = Bitmap.createBitmap(patchW, patchH, Config.ARGB_8888 drawPage(bm, pageW, pageH, patchX, patchY, patchW, patchH);
  23. h.setBm(bm);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement