Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1f98e79a authored by Eric Laurent's avatar Eric Laurent Committed by Android (Google) Code Review
Browse files

Merge "audio effect JNI: fix global ref leak." into mnc-dev

parents 8f4ccd6c 07799984
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -472,6 +472,8 @@ static void android_media_AudioEffect_native_release(JNIEnv *env, jobject thiz)

    if (lpJniStorage) {
        ALOGV("deleting pJniStorage: %p\n", lpJniStorage);
        env->DeleteGlobalRef(lpJniStorage->mCallbackData.audioEffect_class);
        env->DeleteGlobalRef(lpJniStorage->mCallbackData.audioEffect_ref);
        delete lpJniStorage;
    }
}
+2 −0
Original line number Diff line number Diff line
@@ -450,6 +450,8 @@ static void android_media_visualizer_native_release(JNIEnv *env, jobject thiz)

    if (lpJniStorage) {
        ALOGV("deleting pJniStorage: %p\n", lpJniStorage);
        env->DeleteGlobalRef(lpJniStorage->mCallbackData.visualizer_class);
        env->DeleteGlobalRef(lpJniStorage->mCallbackData.visualizer_ref);
        delete lpJniStorage;
    }
}