try to fix hyb1996-guest/auto.js3-issues#20
This commit is contained in:
@@ -21,6 +21,7 @@
|
|||||||
android:allowBackup="false"
|
android:allowBackup="false"
|
||||||
android:icon="@drawable/autojs_material"
|
android:icon="@drawable/autojs_material"
|
||||||
android:label="@string/_app_name"
|
android:label="@string/_app_name"
|
||||||
|
android:largeHeap="true"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/AppTheme"
|
android:theme="@style/AppTheme"
|
||||||
tools:replace="android:label, android:icon, android:allowBackup">
|
tools:replace="android:label, android:icon, android:allowBackup">
|
||||||
|
|||||||
@@ -117,4 +117,16 @@ public class ImageWrapper {
|
|||||||
public Bitmap getBitmap() {
|
public Bitmap getBitmap() {
|
||||||
return mBitmap;
|
return mBitmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void recycle() {
|
||||||
|
if (mBitmap != null) {
|
||||||
|
mBitmap.recycle();
|
||||||
|
mBitmap = null;
|
||||||
|
}
|
||||||
|
if (mMat != null) {
|
||||||
|
mMat.release();
|
||||||
|
mMat = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -108,6 +108,9 @@ public class Images {
|
|||||||
return mPreCaptureImage;
|
return mPreCaptureImage;
|
||||||
}
|
}
|
||||||
mPreCapture = capture;
|
mPreCapture = capture;
|
||||||
|
if(mPreCaptureImage != null){
|
||||||
|
mPreCaptureImage.recycle();
|
||||||
|
}
|
||||||
mPreCaptureImage = ImageWrapper.ofImage(capture);
|
mPreCaptureImage = ImageWrapper.ofImage(capture);
|
||||||
return mPreCaptureImage;
|
return mPreCaptureImage;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user