With this function you can enable or disable the garbage collector. Calling the function with true as the argument enables it and using false disables it (not recommended). It is enabled by default.
gc_enable(enable);
Argument | Type | Description |
---|---|---|
enable | Boolean | enable (true) or disable (false) the garbage collector. |
N/A
if (global.debug == true)
{
gc_enable(false);
}
The above code disables garbage collection if the given global variable is true.