Game Development Community

Delete / Remove / Kill Objcet

by Toni Weidstätter · in Torque Game Builder · 06/09/2011 (8:07 am) · 2 replies

hello!

i want to remove / delete / kill objects that are not on the canvas.
(i've already created a function that recognizes if an object is out of the canvas, i just need some kind of function that removes the object completly out of memory -because -if you play my game for a long time- the fps are going down because onUpdate is also executed on these Objects that are outside the canvas.

how can i remove these objects from the memory?
(some kind oj object = NULL function or something like that)

thanks for help!

#1
06/09/2011 (9:20 am)
I think it is %obj.safeDelete(); in TGB
#2
06/09/2011 (9:42 am)
thank you !