Atom

ffi.free()

Releases an owned native allocation, packed address or callback.

Signature

ffi.free(pointer)

Parameters

Live pointer from alloc, address or callback.

Returns

Null.

Behavior

Frees native allocation, unpins storage or releases callback code. All aliases observe invalidation.

Errors

Released, borrowed or in-use pointer.

Example

Atom
use ffi
p = ffi.alloc(16)
ffi.free(p)