collectgarbage

From Garry's Mod
Revision as of 16:38, 2 October 2016 by NeatNit (Talk | contribs)
Jump to: navigation, search
 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