Game Development Community

Why is memory not released when I delete a SimGroup?

by Phoenix Online Studios · in Torque Game Engine · 02/08/2006 (10:47 am) · 2 replies

I'm creating a SimGroup, containing a number of DTS shapes in it, by executing a .cs file, with the SimGroup definition in it, on the server side. Works just fine. The shapes pop up in the game and the memory use increases correspondingly. But when I delete the SimGroup later, with its delete() method, the memory use stays the same, although the SimGroup is deleted and its shapes disappear. If the object is re-created it doesn't increase the memory use. I thought that maybe the clearTextureHolds() and purgeResources() functions used when you exit a mission would help, but there is no effect. I need deleted SimGroups to release the memory allocated when they're first created because the total number of different SimGroups that I need to be able to create/delete during a mission take up way too much memory together, but I will only need a small number existing at the same time, and I don't want to exit missions to release memory. So, what can I do to make this happen?

#1
02/15/2006 (6:48 am)
An object can only be in one SimGroup at a time. If the objects get added to the MissionGroup, they're resources might be transferring to that group.

Personally I use the SimSet so that objects can be shared between multiple sets and one group, see if that helps.
#2
02/15/2006 (7:32 am)
Isnt there a dump call that dumps all unused resorces?

clearTextureHolds();

or somthing..