遇到了一个很坑的问题,在调用下面的方法截图的时候,调用第一次没什么问题,但是在不做其他动作的时候在调用一次就会内存溢出,谁知道是什么问题吗
public static Bitmap createBitmap(Context context, WebView webview) {
Bitmap bmp = null;
Picture snapShot = webview.capturePicture();
bmp = Bitmap.createBitmap(snapShot.getWidth(), snapShot.getHeight(),
Bitmap.Config.ARGB_4444);
Canvas canvas = new Canvas(bmp);
snapShot.draw(canvas);
return bmp;
}
public static Bitmap createBitmap(Context context, WebView webview) {
Bitmap bmp = null;
Picture snapShot = webview.capturePicture();
bmp = Bitmap.createBitmap(snapShot.getWidth(), snapShot.getHeight(),
Bitmap.Config.ARGB_4444);
Canvas canvas = new Canvas(bmp);
snapShot.draw(canvas);
return bmp;
}