NativeHandle<T> class

Web twin of the native NativeHandle<T>.

On web a native handle IS its integer address — a wasm32 linear-memory offset (or an opaque id the C++ impl chose). The type parameter T is documentation only, exactly as on native; the marker types from the ffi stub (Void, etc.) satisfy existing NativeHandle<Void> spec signatures.

There is deliberately no pointer getter: dereferencing a handle is a native-only operation, so code that does handle.pointer fails to compile for web instead of failing at runtime.

Constructors

NativeHandle.fromAddress(int address)

Properties

address int
The raw address / opaque id.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

attachReleaseCallback(void callback(int address)) → void
Registers the generated release callback for an owned handle.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
release() → void
Manually release the native resource.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited