android createbitmap函数内存溢出,求解怎样进行处理out of memory溢出问题

时间:2023-12-21 16:42:56

android createbitmap函数内存溢出,求解怎样进行处理out of memory溢出问题

android createbitmap函数内存溢出,求解怎样进行处理out of memory溢出问题

android createbitmap函数内存溢出。求解怎样进行处理out of memory溢出问题

局部核心代码:
bitmap = Bitmap.createBitmap(mSize.x, mSize.y, Config.ARGB_8888);
cacheBitmap = Bitmap.createBitmap(mSize.x, mSize.y, Config.ARGB_8888);
cacheCanvas = new Canvas();
cacheCanvas.setBitmap(cacheBitmap);
cacheCanvas.drawBitmap(bitmap, 0, 0, null);
mSearchView.setImageBitmap(bitmap);