blob: 5816e7bbd6fae367a9805749f2fcabe37a5a94a1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
package com.artifex.mupdfdemo;
import android.graphics.Bitmap;
public class BitmapHolder {
private Bitmap bm;
public BitmapHolder() {
bm = null;
}
public synchronized void setBm(Bitmap abm) {
if (bm != null && bm != abm)
bm.recycle();
bm = abm;
}
public synchronized void drop() {
bm = null;
}
public synchronized Bitmap getBm() {
return bm;
}
}
|