Class: GarbageCollector

LuxModule: lux_ext

The GarbageCollector is a wrapper for the collectgarbage function for simplification.

Methods:

Method overview:


collect ()
returns: ()
performs a full garbage-collection cycle.
count ()
returns: (double mem)
returns the total memory in use by Lua (in Kbytes).
restart ()
returns: ()
restarts the garbage collector.
setPause (float pause)
returns: (float previous)
sets arg/100 as the new value for the pause of the collector
setStepMul (float mulstepsize)
returns: (float previous)
sets arg/100 as the new value for the step multiplier of the collector.
step (int n)
returns: (boolean)
performs a garbage-collection step. The step "size" is controlled by arg (larger values mean more steps) in a non-specified way. If you want to control the step size you must tune experimentally the value of arg. Returns true if the step finished a collection cycle.
stop ()
returns: ()
stops the garbage collector.