private static final class ClosureMagazine.Handle extends java.lang.Object implements Closure.Handle
Modifier and Type | Field and Description |
---|---|
private long |
closureAddress |
private long |
codeAddress |
private ClosureMagazine |
magazine |
Modifier | Constructor and Description |
---|---|
private |
Handle(ClosureMagazine magazine,
long closureAddress,
long codeAddress) |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Releases the closure memory back to the operating system.
|
void |
free() |
long |
getAddress()
Gets the native code address of the closure.
|
void |
setAutoRelease(boolean autorelease)
Sets whether the closure memory should be released when the Handle is
garbage collected or not.
|
private final ClosureMagazine magazine
private final long closureAddress
private final long codeAddress
private Handle(ClosureMagazine magazine, long closureAddress, long codeAddress)
public long getAddress()
Closure.Handle
getAddress
in interface Closure.Handle
public void setAutoRelease(boolean autorelease)
Closure.Handle
setAutoRelease
in interface Closure.Handle
autorelease
- If true, the closure memory is automatically managed,
else the closure memory must be explicitly freed.public void dispose()
Closure.Handle
dispose
in interface Closure.Handle
public void free()
free
in interface Closure.Handle