WasmArena class final

Scoped allocator over a WASM module heap — the web analog of package:ffi's Arena. Every allocation is freed when the scope exits.

Constructors

WasmArena(NitroWasmModule module)

Properties

hashCode int
The hash code for this object.
no setterinherited
module NitroWasmModule
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

alloc(int byteCount) int
Allocates byteCount bytes of scratch heap, freed on releaseAll.
copyIn(Uint8List bytes) int
Copies bytes into a fresh arena allocation and returns its offset.
cString(String s) int
Encodes s as a NUL-terminated C string in the arena.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
releaseAll() → void
Frees every allocation. Idempotent.
toString() String
A string representation of this object.
inherited

Operators

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