The "ds_struct_destroy" Function

Syntax#

ds_struct_destroy(id);
ArgumentTypeDescription
idstructThe struct to be destroyed

Description#

Destroys a struct, freeing its data from memory.

note

Running this script is not strictly necessary, as structs will typically be purged automatically when all references to them are removed. However, it is good practice to manually remove structs when they are no longer needed to keep memory usage optimized.

Example#

ds_struct_destroy(my_struct);