AcediaDocumentation

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?): any

Parameters

ParameterTypeDescription
operationstring?Defaults to "collect".
argumentnumber?Optional argument forwarded for other operations.

On this page