--- trunk/OOPSE/libmdtools/StuntDouble.cpp 2004/06/04 02:38:23 1233 +++ trunk/OOPSE/libmdtools/StuntDouble.cpp 2004/06/04 03:15:31 1234 @@ -25,6 +25,16 @@ int StuntDouble::getObjType(){ */ +StuntDouble::~StuntDouble(){ + map::iterator iter; + + for(iter = properties.begin(); iter != properties.end(); ){ + delete iter->second; + iter = properties.erase(iter); + } + +} + int StuntDouble::getObjType(){ return objType; } @@ -622,8 +632,11 @@ void StuntDouble::removeProperty(const string& propNam result = properties.find(propName); - if(result != properties.end()) + if(result != properties.end()){ + delete result->second; properties.erase(result); + + } } GenericData* StuntDouble::getProperty(const string& propName){