Syntax
filtergc(filterType: string, options: table, firstOnly?: boolean): tableArguments
| Name | Type | Description |
|---|---|---|
filterType | string | Type of garbage collector object to match. |
options | table | Optional settings table that controls how the operation behaves. |
firstOnly? | boolean | When true, returns only the first matching garbage collector object. |
Returns
| Name | Type | Description |
|---|---|---|
matches | table | Array table of garbage collector objects that matched the filter. |
Description
Filters garbage collector objects by type and matching options.
Call it with 3 parameter(s): filterType, options, firstOnly. The argument table explains which values are required and which ones only refine the behavior.
It returns matches (table). Use the returns table to separate successful values from nil results and recoverable errors.
Example
Example call with placeholder values.
local result = filtergc("example", {}, true)
print(result)