summaryrefslogtreecommitdiffstats
path: root/graphics/jni
diff options
context:
space:
mode:
authorJoe Onorato <joeo@android.com>2009-08-31 17:23:53 -0700
committerJoe Onorato <joeo@android.com>2009-08-31 17:25:08 -0700
commitae209acd8d48755df7d49459b1bcbc3b8e20561d (patch)
tree786aabeddd1984668b4f2100a4d9337d324bf1fe /graphics/jni
parentec5d9fb47d180d84e3eff0b2138966579be6ac00 (diff)
downloadframeworks_base-ae209acd8d48755df7d49459b1bcbc3b8e20561d.zip
frameworks_base-ae209acd8d48755df7d49459b1bcbc3b8e20561d.tar.gz
frameworks_base-ae209acd8d48755df7d49459b1bcbc3b8e20561d.tar.bz2
Don't leak jni refs.
Diffstat (limited to 'graphics/jni')
-rw-r--r--graphics/jni/android_renderscript_RenderScript.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/graphics/jni/android_renderscript_RenderScript.cpp b/graphics/jni/android_renderscript_RenderScript.cpp
index 3ed3327..558146d 100644
--- a/graphics/jni/android_renderscript_RenderScript.cpp
+++ b/graphics/jni/android_renderscript_RenderScript.cpp
@@ -526,7 +526,7 @@ nAllocationRead_i(JNIEnv *_env, jobject _this, jint alloc, jintArray data)
LOG_API("nAllocationRead_i, con(%p), alloc(%p), len(%i)", con, (RsAllocation)alloc, len);
jint *ptr = _env->GetIntArrayElements(data, NULL);
rsAllocationRead(con, (RsAllocation)alloc, ptr);
- _env->ReleaseIntArrayElements(data, ptr, JNI_COMMIT);
+ _env->ReleaseIntArrayElements(data, ptr, 0);
}
static void
@@ -537,7 +537,7 @@ nAllocationRead_f(JNIEnv *_env, jobject _this, jint alloc, jfloatArray data)
LOG_API("nAllocationRead_f, con(%p), alloc(%p), len(%i)", con, (RsAllocation)alloc, len);
jfloat *ptr = _env->GetFloatArrayElements(data, NULL);
rsAllocationRead(con, (RsAllocation)alloc, ptr);
- _env->ReleaseFloatArrayElements(data, ptr, JNI_COMMIT);
+ _env->ReleaseFloatArrayElements(data, ptr, 0);
}