Qore jni Module  1.2.0
org.qore.jni.QoreObjectBase Class Reference

wrapper class for a Qore object; this class holds a weak reference to the Qore object More...

Inheritance diagram for org.qore.jni.QoreObjectBase:
org.qore.jni.QoreClosure org.qore.jni.QoreObject

Public Member Methods

 QoreObjectBase (long obj)
 creates the wrapper object with a pointer to an object; this Java object holds a weak reference to the Qore object passed here
 
long get ()
 returns the pointer to the object
 
void release ()
 releases the Qore object without destroying it More...
 
void destroy ()
 runs the destructor
 

Private Member Methods

void finalize () throws Throwable
 releases the weak reference
 

Private Attributes

long obj
 a pointer to the Qore object
 

Detailed Description

wrapper class for a Qore object; this class holds a weak reference to the Qore object

Due to the different in garbage collecting approaches (Qore's garbage collector being deterministic and Java's not), strong references to Qore objects must be managed outside of Java.

Note
API usage errors such as with releasing / deleting the object and then calling methods on the object will cause a crash
Since
1.2

Member Function Documentation

◆ release()

void org.qore.jni.QoreObjectBase.release ( )
inline

releases the Qore object without destroying it

Note
if the object is returned to Qore, do not release it; allow the weak reference to be released when finalized

The documentation for this class was generated from the following file: