1
SH_LOCALDELETE
Nunuhara Cabbage edited this page 2019-11-05 21:54:28 -08:00

SH_LOCALDELETE <varno>

Instruction Arguments

int32 varno - The index of the variable to delete

Stack Arguments

None.

Description

Decrease the reference count of a heap-allocated object stored in a local variable, then set the variable's value to NULL.

Example

The following example initializes local variable 3 as a struct type 8, then deletes it. If struct type 8 has a destructor, it will be called during the execution of SH_LOCALDELETE (since the reference count of the object reaches 0).

SH_LOCALCREATE 0x3 0x8
SH_LOCALDELETE 0x3