collectgarbage
Runs a full collection or forwards another collector operation to Luau.
An omitted, empty or "collect" operation performs a full collection and returns no values. Other operations depend on the engine collector and return its results. Collection can invalidate objects held only through weak references.
collectgarbage(operation: string?, argument: number?): anyParameters
| Parameter | Type | Description |
|---|---|---|
operation | string? | Defaults to "collect". |
argument | number? | Optional argument forwarded for other operations. |
