| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final CallContext | callContext
keep a reference to the call context, to avoid GC whilst the magazine is in use |
| private volatile int | |
| private final Foreign | foreign
A handle to the foreign interface to keep it alive as long as this object is alive |
| private final long | |
| private static final AtomicIntegerFieldUpdater |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Closure. | |
| public void | |
| protected void | finalize()
Overrides java. |
| callContext | back to summary |
|---|---|
| private final CallContext callContext keep a reference to the call context, to avoid GC whilst the magazine is in use
| |
| disposed | back to summary |
|---|---|
| private volatile int disposed | |
| foreign | back to summary |
|---|---|
| private final Foreign foreign A handle to the foreign interface to keep it alive as long as this object is alive
| |
| magazineAddress | back to summary |
|---|---|
| private final long magazineAddress | |
| UPDATER | back to summary |
|---|---|
| private static final AtomicIntegerFieldUpdater<ClosureMagazine> UPDATER | |
| ClosureMagazine | back to summary |
|---|---|
| pack-priv ClosureMagazine(Foreign foreign, CallContext callContext, long magazineAddress) | |
| allocate | back to summary |
|---|---|
| public Closure. | |
| dispose | back to summary |
|---|---|
| public void dispose() | |
| finalize | back to summary |
|---|---|
| protected void finalize() throws Throwable Overrides java. Doc from java. Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
A subclass overrides the
When running in a Java virtual machine in which finalization has been
disabled or removed, the garbage collector will never call
The general contract of
The
The Java programming language does not guarantee which thread will
invoke the
After the
The
Any exception thrown by the | |
| Modifier and Type | Field and Description |
|---|---|
| private final long | |
| private final long | |
| private final ClosureMagazine |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | dispose()
Implements com. |
| public void | |
| public long | getAddress()
Implements com. |
| public void | setAutoRelease(boolean
If true, the closure memory is automatically managed,
else the closure memory must be explicitly freed. autorelease)Implements com. Handle is
garbage collected or not.
|
| closureAddress | back to summary |
|---|---|
| private final long closureAddress | |
| codeAddress | back to summary |
|---|---|
| private final long codeAddress | |
| magazine | back to summary |
|---|---|
| private final ClosureMagazine magazine | |
| Handle | back to summary |
|---|---|
| private Handle(ClosureMagazine magazine, long closureAddress, long codeAddress) | |
| dispose | back to summary |
|---|---|
| public void dispose() Implements com. Doc from com. Releases the closure memory back to the operating system.
Although the closure trampoline memory will normally be released when
the | |
| free | back to summary |
|---|---|
| public void free() Implements com. | |
| getAddress | back to summary |
|---|---|
| public long getAddress() Implements com. Doc from com. Gets the native code address of the closure. This can be passed into a native function that takes a function pointer.
| |
| setAutoRelease | back to summary |
|---|---|
| public void setAutoRelease(boolean autorelease) Implements com. Doc from com. Sets whether the closure memory should be released when the
| |