android/runtime/v8/src/native/JavaObject.cpp
void JavaObject::deleteGlobalRef()
{
	JNIEnv *env = JNIUtil::getJNIEnv();
	ASSERT(env != NULL);

	if (useGlobalRefs) {
		ASSERT(javaObject_ != NULL);
		if (isWeakRef_) {
			env->DeleteWeakGlobalRef(javaObject_);
		} else {
			env->DeleteGlobalRef(javaObject_);
		}
		javaObject_ = NULL;
	} else {
		ReferenceTable::destroyReference(refTableKey_);
		refTableKey_ = 0;
	}
}
// Deletes the reference to the wrapped Java object.
// This should only happen once this object is no longer
// needed and about to be deleted.
Deletes the reference to the wrapped Java object.
This should only happen once this object is no longer
needed and about to be deleted.
Deletes the reference to the wrapped Java object . This should only happen once this object is no longer needed and about to be deleted .
void JavaObject::deleteGlobalRef()
{
	JNIEnv *env = JNIUtil::getJNIEnv();
	ASSERT(env != NULL);
	if (useGlobalRefs) {
		ASSERT(javaObject_ != NULL);
		if (isWeakRef_) {
			env->DeleteWeakGlobalRef(javaObject_);
		} else {
			env->DeleteGlobalRef(javaObject_);
		}
		javaObject_ = NULL;
	} else {
		ReferenceTable::destroyReference(refTableKey_);
		refTableKey_ = 0;
	}
}
void JavaObject :: deleteGlobalRef ( ) { JNIEnv * env = JNIUtil :: getJNIEnv ( ) ; ASSERT ( env != NULL ) ; if ( useGlobalRefs ) { ASSERT ( javaObject_ != NULL ) ; if ( isWeakRef_ ) { env -> DeleteWeakGlobalRef ( javaObject_ ) ; } else { env -> DeleteGlobalRef ( javaObject_ ) ; } javaObject_ = NULL ; } else { ReferenceTable :: destroyReference ( refTableKey_ ) ; refTableKey_ = 0 ; } }
Deletes the reference to the wrapped Java object.
Deletes the reference to the wrapped Java object .