Commit c01d26f8 by olly Committed by Oliver Woodman

Restore DeleteLocalRef usage

Issue: #8845
PiperOrigin-RevId: 369685031
parent 9d4cbd4e
Showing with 2 additions and 0 deletions
......@@ -47,6 +47,7 @@ class JavaDataSource : public DataSource {
if (mid == NULL) {
jclass cls = env->GetObjectClass(flacDecoderJni);
mid = env->GetMethodID(cls, "read", "(Ljava/nio/ByteBuffer;)I");
env->DeleteLocalRef(cls);
}
}
......@@ -57,6 +58,7 @@ class JavaDataSource : public DataSource {
// Exception is thrown in Java when returning from the native call.
result = -1;
}
env->DeleteLocalRef(byteBuffer);
return result;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment