ReferenceDebug

debug.setmemorycategory

Assigns the current thread’s memory-category tag. It changes attribution, not a memory limit. The returned value is the previous tag.

Syntax

debug.setmemorycategory(tag: string) -> string

Parameters

ParameterTypeDescription
tagstringNew category name.

Returns

TypeDescription
stringPrevious category tag.

Description

This function is inherited from the selected engine. Apex does not implement a replacement when the engine refuses the operation.

Example

local previous = debug.setmemorycategory("Example")
print(previous)
debug.resetmemorycategory()

These are Game executor contracts. Check build requirements and session lifetimes before using them.