Merge "ImageReader: Make close thread safe" into nyc-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
2f8bf1f024
@@ -512,11 +512,11 @@ public class ImageReader implements AutoCloseable {
|
|||||||
mAcquiredImages.clear();
|
mAcquiredImages.clear();
|
||||||
|
|
||||||
nativeClose();
|
nativeClose();
|
||||||
}
|
|
||||||
|
|
||||||
if (mEstimatedNativeAllocBytes > 0) {
|
if (mEstimatedNativeAllocBytes > 0) {
|
||||||
VMRuntime.getRuntime().registerNativeFree(mEstimatedNativeAllocBytes);
|
VMRuntime.getRuntime().registerNativeFree(mEstimatedNativeAllocBytes);
|
||||||
mEstimatedNativeAllocBytes = 0;
|
mEstimatedNativeAllocBytes = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user