Deleting script objects
by Vance Souders · in Torque Game Builder · 07/31/2006 (8:27 am) · 1 replies
What is the proper way to delete an object created with new in script? I've tried calling delete on sprites created with new, but they still appear on screen after the call. If I try to use safedelete, I get a console error saying the function cannot be found.
Also, am I correct in assuming that code like this will return a reference to the object:
Thanks,
Vance
Also, am I correct in assuming that code like this will return a reference to the object:
%screen_point = new ScriptObject() { class="point2D"; };
%this_is_a_reference_to_a_point_2d = %screen_point;
//delete screen_point using the reference
%this_is_a_reference_to_a_point_2d.delete();Thanks,
Vance
Torque Owner Thomas Buscaglia