Jump to content
Toggle menu
  • 17.3K articles
  • 8.2K files
  • 5 users
  • 280.7K edits
WoW Classic Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

API collectgarbage

From WoW Classic Wiki
collectgarbage -Documentation by Aradan-

Sets garbage collection limit and calls the garbage collector if the Lua byte counter exceeds this limit.

collectgarbage({limit})

Parameters

Arguments

({limit})
limit
Number - GC limit (in KiB). If omitted, defaults to zero, forcing garbage collection.

Example

collectgarbage() -- Force garbage collection
collectgarbage(131072) -- Set GC limit to 128 MiB

Note

There is a Lua function with the exact same name but its parameters and behavior is quite different from the WoW API version.