public abstract class NativeResource
extends java.lang.Object
implements java.lang.AutoCloseable
NativeResource is an internal class for AutoCloseable blocks of memory created in
the MXNet Engine.| Modifier and Type | Field and Description |
|---|---|
protected java.util.concurrent.atomic.AtomicReference<com.sun.jna.Pointer> |
handle |
| Modifier | Constructor and Description |
|---|---|
protected |
NativeResource(com.sun.jna.Pointer pointer) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected void |
finalize() |
com.sun.jna.Pointer |
getHandle()
Gets the
Pointer to this resource. |
java.lang.String |
getUid()
Gets the unique ID of this resource.
|
boolean |
isReleased()
Gets the boolean that indicates whether this resource has been released.
|
protected final java.util.concurrent.atomic.AtomicReference<com.sun.jna.Pointer> handle
public boolean isReleased()
public com.sun.jna.Pointer getHandle()
Pointer to this resource.Pointer to this resourcepublic final java.lang.String getUid()
public void close()
close in interface java.lang.AutoCloseableprotected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable