WasmGPU.compute.CPUndarray.destroyed¶
Summary¶
WasmGPU.compute.CPUndarray.destroyed reports whether the ndarray's owned WebAssembly allocations have been released.
Syntax¶
Returns¶
boolean - false until destroy() is called and true afterward.
Example¶
const a = wgpu.compute.CPUndarray.zeros("f32", { shape: [4] });
console.log(a.destroyed); // false
a.destroy();
console.log(a.destroyed); // true