Public Member Functions | |
| void | storeReference (Context ctx, T obj) |
| void | forceClear (Context ctx) |
Protected Member Functions | |
| IDecRefQueue () | |
| abstract void | decRef (Context ctx, long obj) |
| void | clear (Context ctx) |
A queue to handle management of native memory.
Mechanics: once an object is created, a metadata is stored for it in referenceMap, and a PhantomReference is created with a reference to referenceQueue. Once the object becomes strongly unreachable, the phantom reference gets added by JVM to the referenceQueue. After each object creation, we iterate through the available objects in referenceQueue and decrement references for them.
| <T> | Type of object stored in queue. |
Definition at line 39 of file IDecRefQueue.java.
|
inlineprotected |
Definition at line 44 of file IDecRefQueue.java.
|
inlineprotected |
Clean all references currently in referenceQueue.
Definition at line 65 of file IDecRefQueue.java.
Referenced by IDecRefQueue< T extends Z3Object >.storeReference().
|
abstractprotected |
An implementation of this method should decrement the reference on a given native object. This function should always be called on the ctx thread.
| ctx | Z3 context. |
| obj | Pointer to a Z3 object. |
Referenced by IDecRefQueue< T extends Z3Object >.clear(), and IDecRefQueue< T extends Z3Object >.forceClear().
|
inline |
Clean all references stored in referenceMap, regardless of whether they are in referenceMap or not.
Definition at line 78 of file IDecRefQueue.java.
|
inline |
Definition at line 56 of file IDecRefQueue.java.