Global/collectgarbage

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
m (Also menu state)
m (remove Name and Parent)
Line 3: Line 3:
 
|Realm=Shared and Menu
 
|Realm=Shared and Menu
 
|IsClass=No
 
|IsClass=No
|Name=collectgarbage
 
|Parent=Global
 
 
}}
 
}}
 
{{Arg
 
{{Arg

Revision as of 16:38, 2 October 2016

 collectgarbage( )

Contents

Description

Executes the specified action on the garbage collector.

Arguments

string action="collect"

The action to run.

Valid actions are "collect", "stop", "restart", "count", "step", "setpause" and "setstepmul".

Arguments

number arg

The argument of the specified action, only applicable for "step", "setpause" and "setstepmul".

Returns

Examples

Example

The current floored dynamic memory usage of Lua, in kilobytes.

print( collectgarbage( "count" ) )


Personal tools
Navigation