diff options
author | Eric Laurent <elaurent@google.com> | 2015-06-19 09:13:02 -0700 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2015-06-19 09:13:02 -0700 |
commit | 077999844f306d31d3ea9593b7e7b2f06e7f7483 (patch) | |
tree | be37ba222a78c35b8694051e7aed8daad8b0370a /media/jni/audioeffect | |
parent | 45bb0ca49a052cd6da3e4ced7709372972abdf55 (diff) | |
download | frameworks_base-077999844f306d31d3ea9593b7e7b2f06e7f7483.zip frameworks_base-077999844f306d31d3ea9593b7e7b2f06e7f7483.tar.gz frameworks_base-077999844f306d31d3ea9593b7e7b2f06e7f7483.tar.bz2 |
audio effect JNI: fix global ref leak.
Remove one more global ref leak in AudioEffect
and Visualizer JNI.
Bug: 21629892.
Change-Id: Id77fc2d10f3dc9d3154d6a1cf0f8cc0f83683584
Diffstat (limited to 'media/jni/audioeffect')
-rw-r--r-- | media/jni/audioeffect/android_media_AudioEffect.cpp | 2 | ||||
-rw-r--r-- | media/jni/audioeffect/android_media_Visualizer.cpp | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/media/jni/audioeffect/android_media_AudioEffect.cpp b/media/jni/audioeffect/android_media_AudioEffect.cpp index fdc586b..aba4bbe 100644 --- a/media/jni/audioeffect/android_media_AudioEffect.cpp +++ b/media/jni/audioeffect/android_media_AudioEffect.cpp @@ -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; } } diff --git a/media/jni/audioeffect/android_media_Visualizer.cpp b/media/jni/audioeffect/android_media_Visualizer.cpp index 6098b4a..0557019 100644 --- a/media/jni/audioeffect/android_media_Visualizer.cpp +++ b/media/jni/audioeffect/android_media_Visualizer.cpp @@ -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; } } |