ffi_helper library

Classes

Arena
An Allocator which frees all allocations at the same time.
CallocAllocator
Manages memory on the native heap.
MallocAllocator
Manages memory on the native heap.
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 on String
Extension method for converting a String to a Pointer<Utf16>.
StringUtf8Pointer on String
Extension method for converting a String to a Pointer<Utf8>.
Utf16Pointer on Pointer<Utf16>
Extension method for converting aPointer<Utf16> to a String.
Utf8Pointer on Pointer<Utf8>
Extension method for converting a Pointer<Utf8> to a String.

Constants

calloc → const CallocAllocator
Manages memory on the native heap.
malloc → const MallocAllocator
Manages memory on the native heap.

Properties

zoneArena Arena
A zone-specific Arena.
no setter

Functions

using<R>(R computation(Arena 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.