Advertisement
Guest User

Untitled

a guest
Jan 10th, 2013
258
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.  
  14. diff --git a/android/src/com/artifex/mupdf/MuPDFCore.java b/android/src/com/artiindex 15c90e1..ef1c17a 100644
  15. --- a/android/src/com/artifex/mupdf/MuPDFCore.java
  16. +++ b/android/src/com/artifex/mupdf/MuPDFCore.java
  17. @@ -121,6 +121,8 @@ public class MuPDFCore
  18. int patchX, int patchY,
  19. int patchW, int patchH) {
  20. gotoPage(page);
  21. + // Clear the reference out before creating the new bitmap
  22. + h.setBm(null);
  23. Bitmap bm = Bitmap.createBitmap(patchW, patchH, Config.ARGB_8888 drawPage(bm, pageW, pageH, patchX, patchY, patchW, patchH);
  24. h.setBm(bm);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement