Correctly check refCount in finalize.

PiperOrigin-RevId: 505057866
This commit is contained in:
MediaPipe Team 2023-01-27 01:50:57 -08:00 committed by Copybara-Service
parent c29ab7f083
commit e059d55d29

View File

@ -158,7 +158,7 @@ public class GraphTextureFrame implements TextureFrame {
@Override
protected void finalize() throws Throwable {
if (refCount >= 0 || nativeBufferHandle != 0) {
if (refCount > 0 || nativeBufferHandle != 0) {
logger.atWarning().log("release was not called before finalize");
}
if (!activeConsumerContextHandleSet.isEmpty()) {