Game Development Community

SimSet Question

by Stanley D Chatman · in Torque Game Builder · 02/14/2008 (2:39 pm) · 2 replies

Does the SimSet function remove actually destroy the object or does it just remove it from the SimSet?

Another way to look at this is after I do a

SimSet.remove(obj1);

do I need to do a

obj1.safeDelete();






Thanks..

#1
02/14/2008 (2:47 pm)
SimSet::remove just removes the object from the SimSet. It does not delete the object. Same thing goes for SimGroup::remove.

On a related note, deleting an object should automatically remove it from all SimSets/SimGroup.
#2
02/14/2008 (2:50 pm)
Deleting an object definitely removes it from all simsets/simgroups

Ran into a problem the other day where I was creating lots and lots of simsets and never deleting/clearing them, then on level complete, when it cleaned up all my sceneobjects, took about 30 seconds to unfreeze, and I tracked it down to tons of simset remove calls