A raw native memory buffer outside the Haxe GC.

Static methods

staticinlinefromAddress(address:Int64, size:Int):NativeBuffer

Creates a NativeBuffer from an existing memory address. The resulting buffer does not own the memory and will not free it.

staticgetActiveAllocations():Int

Returns the total number of active native allocations tracked by the library.

Constructor

new(size:Int)

Variables

read onlyaddress:Int64

Returns the raw memory address of this buffer.

read onlysize:Int

Methods

free():Void

@:has_untyped@:value({ length : -1, offset : 0 })fromBytes(bytes:Bytes, offset:Int = 0, length:Int = -1):Void

Copies data from a Haxe Bytes object to this native buffer.

@:has_untypedtoBytes():Bytes

Copies data from this native buffer to a Haxe Bytes object.