getgc
Lists live garbage-collected objects.
Syntax
Signature
getgc(IncludeFunctions: boolean?, IncludeStrings: boolean?) -> {any}Aliases
This function has no aliases.
Parameters
| Parameter | Type | Description |
|---|---|---|
IncludeFunctions | boolean? | Include live functions in addition to tables. |
IncludeStrings | boolean? | Include live, nonempty strings up to 256 bytes. |
Returns
| Type | Description |
|---|---|
{any} | One-based list of live objects matching the requested kinds. |
Notes
IncludeFunctions adds functions, and IncludeStrings adds nonempty strings of at most 256 bytes. Results are a snapshot and their order is unspecified.
Example
Luau
local Result = getgc()
print(Result)