Is constructTSShape leaking?
by Neo Binedell · in Torque Game Engine Advanced · 06/21/2005 (9:00 pm) · 1 replies
As I have not delved into the memory manager or garbage collection the following shouts at me
I've looked in the both TSShape and ResourceInstance constructors and I don't see any register(this) kinda stuff so what gives?
Is operator new() overloaded to auto track allocations and delete them or some other magik?
Am I just being paranoid and missing something?
Perhaps one of you can enlighten me...
regards
neo
ResourceInstance *constructTSShape(Stream &stream)
{
TSShape * ret = new TSShape;
if (ret->read(&stream))
return ret;
else
return NULL; // <---- IF WE GET HERE ret IS NEVER REFERENCED AGAIN AND SO IS LOST?
}I've looked in the both TSShape and ResourceInstance constructors and I don't see any register(this) kinda stuff so what gives?
Is operator new() overloaded to auto track allocations and delete them or some other magik?
Am I just being paranoid and missing something?
Perhaps one of you can enlighten me...
regards
neo
Associate Kyle Carter