ffi/ffi library

Classes

Arena
An Allocator which frees all allocations at the same time.
Utf16
The contents of a native zero-terminated array of UTF-16 code units.
Utf8
The contents of a native zero-terminated array of UTF-8 code units.

Extensions

StringUtf16Pointer
Extension method for converting a String to a Pointer<Utf16>.
StringUtf8Pointer
Extension method for converting a String to a Pointer<Utf8>.
Utf16Pointer
Extension method for converting aPointer<Utf16> to a String.
Utf8Pointer
Extension method for converting aPointer<Utf8> to a String.

Constants

calloc → const Allocator
Manages memory on the native heap.
malloc → const Allocator
Manages memory on the native heap.

Properties

zoneArena Arena
A zone-specific Arena.
no setter

Functions

using<R>(R computation(Arena), [Allocator wrappedAllocator = calloc]) → R
Runs computation with a new Arena, and releases all allocations at the end.
withZoneArena<R>(R computation(), [Allocator wrappedAllocator = calloc]) → R
Creates a zoned Arena to manage native resources.