WoW:API collectgarbage: Difference between revisions
Jump to navigation
Jump to search
collectgarbage -Documentation by Aradan-
No edit summary |
(markup ftw) |
||
| Line 14: | Line 14: | ||
collectgarbage() -- Force garbage collection | collectgarbage() -- Force garbage collection | ||
collectgarbage(131072) -- Set GC limit to 128 MiB | 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. | |||
---- | ---- | ||
__NOTOC__ | __NOTOC__ | ||
{{Template:WoW API}} | {{Template:WoW API}} | ||
Revision as of 13:25, 24 May 2006
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.