ktaglib: improve jvminputstream mem use

This commit is contained in:
Alexander Capehart 2024-12-12 18:39:35 -07:00
parent 34be5fb2a5
commit 44de732247
No known key found for this signature in database
GPG key ID: 37DBE3621FE9AD47

View file

@ -25,9 +25,13 @@ JVMInputStream::JVMInputStream(JNIEnv *env, jobject inputStream) :
inputStreamClearMethod = env->GetMethodID(inputStreamClass, "clear", "()V");
inputStreamTellMethod = env->GetMethodID(inputStreamClass, "tell", "()J");
inputStreamLengthMethod = env->GetMethodID(inputStreamClass, "length", "()J");
env->DeleteLocalRef(inputStreamClass);
}
JVMInputStream::~JVMInputStream() {}
JVMInputStream::~JVMInputStream() {
// The implicit assumption is that inputStream is managed by the owner,
// so we don't need to delete any references here
}
TagLib::FileName JVMInputStream::name() const {
auto name = (jstring) env->CallObjectMethod(inputStream, inputStreamNameMethod);