diff options
Diffstat (limited to 'platform/android/src/com/artifex/mupdfdemo/PageView.java')
-rw-r--r-- | platform/android/src/com/artifex/mupdfdemo/PageView.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/platform/android/src/com/artifex/mupdfdemo/PageView.java b/platform/android/src/com/artifex/mupdfdemo/PageView.java index c7fecea1..2ee407cb 100644 --- a/platform/android/src/com/artifex/mupdfdemo/PageView.java +++ b/platform/android/src/com/artifex/mupdfdemo/PageView.java @@ -200,7 +200,15 @@ public abstract class PageView extends ViewGroup { public void releaseBitmaps() { reinit(); + + // recycle bitmaps before releasing them. + + if (mEntireBm!=null) + mEntireBm.recycle(); mEntireBm = null; + + if (mPatchBm!=null) + mPatchBm.recycle(); mPatchBm = null; } |