Skip to content

API Reference / @gtkx/runtime / alloc

Function: alloc()

alloc(size, typeName?): ExternalObject<Handle>

Defined in: native/index.d.ts:14

Allocates a zero-filled native memory block of size bytes and returns an opaque handle to it. The optional typeName tags the boxed allocation with a GType name.

Parameters

size

number

typeName?

string | null

Returns

ExternalObject<Handle>

Released under the MPL-2.0 License.