Class ArenaResourceManager.ManagedNativeResource
java.lang.Object
ai.tegmentum.wasmtime4j.panama.ArenaResourceManager.ManagedNativeResource
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
ArenaResourceManager
public static final class ArenaResourceManager.ManagedNativeResource
extends Object
implements AutoCloseable
Managed native resource that tracks its lifecycle.
-
Method Details
-
resource
Gets the native pointer.- Returns:
- the native pointer
- Throws:
IllegalStateException- if the resource is closed
-
getDescription
Gets the description of this managed resource.- Returns:
- the description
-
isValid
public boolean isValid()Checks if the resource is valid (not closed).- Returns:
- true if valid, false if closed
-
close
-
toString
-