Commit 99b51e72 authored by David Cole's avatar David Cole
Browse files

ENH: Merge changes from main tree into VTK-5-0 branch. (cvs -q up -j1.59...

ENH: Merge changes from main tree into VTK-5-0 branch. (cvs -q up -j1.59 -j1.60 Common/vtkJavaUtil.cxx)
parent b9e20793
......@@ -286,11 +286,7 @@ VTK_GET_MUTEX();
id = vtkJavaIdCount;
vtkInstanceLookup->AddHashEntry((void *)(size_t)vtkJavaIdCount,ptr);
#ifdef JNI_VERSION_1_2
vtkPointerLookup->AddHashEntry(ptr,(void *)env->NewWeakGlobalRef(obj));
#else
vtkPointerLookup->AddHashEntry(ptr,(void *)env->NewGlobalRef(obj));
#endif
vtkJavaSetId(env,obj,vtkJavaIdCount);
#ifdef VTKJAVADEBUG
......@@ -320,11 +316,7 @@ JNIEXPORT void vtkJavaDeleteObjectFromHash(JNIEnv *env, int id)
vtkInstanceLookup->DeleteHashEntry((void *)(size_t)id);
vtkTypecastLookup->DeleteHashEntry((void *)(size_t)id);
vptr = vtkPointerLookup->GetHashTableValue(ptr);
#ifdef JNI_VERSION_1_2
env->DeleteWeakGlobalRef((jweak)vptr);
#else
env->DeleteGlobalRef((jobject)vptr);
#endif
vtkPointerLookup->DeleteHashEntry(ptr);
}
......
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