import { type MallocObj } from "https://deno.land/x/canvaseno@v1.0.2/types.ts";
This object is a wrapper around a pointer to some memory on the WASM heap. The type of the pointer was determined at creation time.
Methods
subarray(start: number, end: number): TypedArray
Return a read/write view into a subset of the memory. Do not cache the TypedArray this returns, it may be invalidated if the WASM heap is resized. This is the same as calling .toTypedArray().subarray() except the returned TypedArray can also be passed into an API and not cause an additional copy.
toTypedArray(): TypedArray
Return a read/write view of the memory. Do not cache the TypedArray this returns, it may be invalidated if the WASM heap is resized. If this TypedArray is passed into a CanvasKit API, it will not be copied again, only the pointer will be re-used.