aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-11-05 16:53:18 +0100
committerSven Gothel <[email protected]>2013-11-05 16:53:18 +0100
commit1d426dd08797a3164e0a7cdf6007d3e750650265 (patch)
tree08c427b3f0b16efb2263fcc8e3cea8f47adb9f14
parentb3f6b2fc9ec8aaf6aa5b4297aef1f5228eb15702 (diff)
JNI Code: Call DeleteLocalRef(..) manually.
-rw-r--r--src/jogl/native/libav/ffmpeg_impl_template.c1
-rw-r--r--src/nativewindow/native/x11/Xmisc.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/jogl/native/libav/ffmpeg_impl_template.c b/src/jogl/native/libav/ffmpeg_impl_template.c
index 34a2baeb7..24fddd2c0 100644
--- a/src/jogl/native/libav/ffmpeg_impl_template.c
+++ b/src/jogl/native/libav/ffmpeg_impl_template.c
@@ -1275,6 +1275,7 @@ JNIEXPORT jint JNICALL FF_FUNC(readNextPacket0)
pNIOBufferCurrent->nioRef = (*env)->NewGlobalRef(env, jSampleData);
pNIOBufferCurrent->origPtr = data_ptr;
pNIOBufferCurrent->size = data_size;
+ (*env)->DeleteLocalRef(env, jSampleData);
if(pAV->verbose) {
fprintf(stderr, "A NIO: Alloc ptr %p / ref %p, %d bytes\n",
pNIOBufferCurrent->origPtr, pNIOBufferCurrent->nioRef, pNIOBufferCurrent->size);
diff --git a/src/nativewindow/native/x11/Xmisc.c b/src/nativewindow/native/x11/Xmisc.c
index 2bf740233..442d0ceef 100644
--- a/src/nativewindow/native/x11/Xmisc.c
+++ b/src/nativewindow/native/x11/Xmisc.c
@@ -368,6 +368,7 @@ Java_jogamp_nativewindow_x11_X11Lib_XGetVisualInfo1__JJLjava_nio_ByteBuffer_2Lja
jbyteSource = (*env)->NewDirectByteBuffer(env, _res, count * sizeof(XVisualInfo));
jbyteCopy = (*env)->CallStaticObjectMethod(env, clazzBuffers, cstrBuffers, jbyteSource);
+ (*env)->DeleteLocalRef(env, jbyteSource);
XFree(_res);