AcediaDocumentation

getobjectreferences

Lists every live table of this VM that holds a given value.

Walks the garbage collector pages of the caller's VM and returns the tables holding the value, as keys or as values. A table is never reported as a reference to itself. The result can be empty.

getobjectreferences(value: any): {table}

Parameters

ParameterTypeDescription
valueanyValue to search for.

Example

local marker = {}
local holder = { marker }
print(#getobjectreferences(marker) >= 1)

Example output

true

Errors: Calling it with no argument raises an error.

Aliases: getfunctionreferences.

On this page