MEMORY

Free

Frees a block allocated with Alloc.

Syntax

local ok = ONYX.Memory.Free(address)

Parameters

  • address (integer) — Address returned by Alloc.

Return(s)

boolean — true on success, false otherwise.

Behavior

  • Only frees memory that was allocated by the same Lua environment.

Example(s)

local buf = ONYX.Memory.Alloc(4096)
ONYX.Memory.Free(buf)