struct

Luajit::LuaGC

Inherits Struct < Value < Object

Controls the Lua Garbage Collector

Instance methods

collect

Performs a full garbage-collection cycle

Raises LuaError if operation fails

Source
count

Returns the current amount of memory (in KBs) in use by Lua

Raises LuaError if operation fails

Source
count_bytes

Returns the remainder of dividing the current amount of bytes of memory in use by Lua by 1024

Raises LuaError if operation fails

Source
restart

Restarts the garbage collector

Raises LuaError if operation fails

Source
set_pause(data : Int32) : Int32

Sets data as the new value for the pause of the collector

Returns the previous value of the pause.

Raises LuaError if operation fails

Source
set_step_multiplier(data : Int32) : Int32

Sets data as the new value for the step multiplier of the collector

Returns the previous value of the step multiplier.

Raises LuaError if operation fails

Source
step(size : Int32) : Int32

Performs an incremental step of garbage collection

To control the step size, you must experimentally tune the value of size.

Returns 1 if the step finished a garbage-collection cycle.

Raises LuaError if operation fails

Source
stop

Stops the garbage collector

Raises LuaError if operation fails

Source