summaryrefslogtreecommitdiff
path: root/demos/java/jni/gs_jni/jni_util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'demos/java/jni/gs_jni/jni_util.cpp')
-rw-r--r--demos/java/jni/gs_jni/jni_util.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/demos/java/jni/gs_jni/jni_util.cpp b/demos/java/jni/gs_jni/jni_util.cpp
index 0c1710bd8..df390a7f1 100644
--- a/demos/java/jni/gs_jni/jni_util.cpp
+++ b/demos/java/jni/gs_jni/jni_util.cpp
@@ -34,9 +34,7 @@ jmethodID util::getMethodID(JNIEnv *env, jobject object, const char *method, con
if (env == NULL || object == NULL || method == NULL || sig == NULL)
return NULL;
- jobject obj = env->NewLocalRef(object);
- jclass clazz = env->GetObjectClass(obj);
- env->DeleteLocalRef(obj);
+ jclass clazz = env->GetObjectClass(object);
jmethodID methodID = env->GetMethodID(clazz, method, sig);
if (methodID == NULL)