Lua:deAlloc

From Cheat Engine
Revision as of 04:06, 21 June 2026 by Leunsel (talk | contribs) (Created page with "Category:Lua {{CodeBox|'''function''' deAlloc(''address'', ''size'') ''':''' void}} Frees previously allocated memory. If ''size'' is provided, it specifies the size of...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

<> Lua API Reference

function deAlloc(address, size) : void

Frees previously allocated memory.

If size is provided, it specifies the size of the memory block to free.

Function Parameters

Parameter Type Description
address Integer or CEAddressString The address of the allocated memory block to free.
size Integer (optional) The size of the memory block to free.

Returns

void — This function does not return any value.

Examples

local address = allocateMemory(1024)

-- Use the allocated memory here
printf("Address: 0x%X",address)

deAlloc(address, 1024)

Main Pages

Core Lua documentation entry points

Lua
Script Engine