mirror of
https://github.com/androidx/media.git
synced 2025-05-04 22:20:47 +08:00
Remove unnecessary DeleteLocalRef usage
Keeping the ones inside loops, because theoretically they can be useful there (in practice, for this use case, it's highly unlikely to make any difference). PiperOrigin-RevId: 272834073
This commit is contained in:
parent
495b418fb1
commit
5e090d81b4
@ -46,7 +46,6 @@ 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,7 +56,6 @@ class JavaDataSource : public DataSource {
|
||||
// Exception is thrown in Java when returning from the native call.
|
||||
result = -1;
|
||||
}
|
||||
env->DeleteLocalRef(byteBuffer);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user