WoW:API collectgarbage: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(markup ftw)
m (wowapi template added)
Line 1: Line 1:
{{wowapi}}
<center>'''collectgarbage''' ''-Documentation by [[user:Aradan|Aradan]]-''</center>
<center>'''collectgarbage''' ''-Documentation by [[user:Aradan|Aradan]]-''</center>


Line 21: Line 22:
----
----
__NOTOC__
__NOTOC__
{{Template:WoW API}}

Revision as of 09:51, 17 August 2006

WoW API < collectgarbage

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.