Commit fce46541 authored by Thomas Guillem's avatar Thomas Guillem

libvlcjni: fix local ref leak

parent 5a2f6f64
......@@ -153,6 +153,7 @@ static void vlc_event_callback(const libvlc_event_t *ev, void *data)
jmethodID putLong = (*env)->GetMethodID(env, clsBundle, "putLong", "(Ljava/lang/String;J)V" );
jmethodID putFloat = (*env)->GetMethodID(env, clsBundle, "putFloat", "(Ljava/lang/String;F)V" );
jmethodID putString = (*env)->GetMethodID(env, clsBundle, "putString", "(Ljava/lang/String;Ljava/lang/String;)V" );
(*env)->DeleteLocalRef(env, clsBundle);
if (ev->type == libvlc_MediaPlayerPositionChanged) {
jstring sData = (*env)->NewStringUTF(env, "data");
......@@ -211,6 +212,7 @@ static void vlc_event_callback(const libvlc_event_t *ev, void *data)
} else {
LOGE("EventHandler: failed to get the callback method");
}
(*env)->DeleteLocalRef(env, cls);
end:
(*env)->DeleteLocalRef(env, bundle);
......
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 to comment