[Plib-users] Memory Leak in ssgloader3ds
Brought to you by:
sjbaker
From: Walter A. <wa...@wr...> - 2004-02-05 16:33:04
|
Every entity that loads a 3ds image has a memory leak in my program. Usually I removeallkids from the root and everything is fine. DevPartner Error Detection found this leak at: void ssgBase::setName ( const char *nm ) { delete [] name ; if ( nm == NULL ) name = NULL ; else { name = new char [ strlen ( nm ) + 1 ] ; strcpy ( name, nm ) ; } } This leaks originates from : RedRange_obj = ssgLoad3ds( "REDRANGEPOST.3ds" ) ; RedRange_obj is a child in m_pShipRoot, my deconstructor has the following: m_pShipRoot->removeAllKids(); delete m_pShipRoot; Still the leak is present. Any suggestions on how to properly delete a ssgload3ds entity? Thanks- Jason Altice |