ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/StuntDouble.cpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/StuntDouble.cpp (file contents):
Revision 1187 by chrisfen, Sat May 22 18:16:18 2004 UTC vs.
Revision 1253 by gezelter, Tue Jun 8 16:49:46 2004 UTC

# Line 24 | Line 24
24        quotes above are from Spaceballs...)
25  
26   */
27 +
28 + StuntDouble::~StuntDouble(){
29 +  map<string, GenericData*>::iterator iter;
30 +
31 +  for(iter = properties.begin(); iter != properties.end(); ++iter ){
32 +    delete iter->second;
33 +    properties.erase(iter);
34 +  }
35 +    
36 + }
37  
38   int StuntDouble::getObjType(){
39    return objType;
# Line 128 | Line 138 | void StuntDouble::setVel(double vel[3]){
138   }
139  
140   void StuntDouble::setVel(double vel[3]){
141 +
142    switch (objType)
143      {
144      case OT_ATOM :
# Line 622 | Line 633 | void StuntDouble::removeProperty(const string& propNam
633      
634    result = properties.find(propName);
635    
636 <  if(result != properties.end())
636 >  if(result != properties.end()){
637 >    delete result->second;
638      properties.erase(result);
639 +    
640 +  }
641    
642   }
643   GenericData* StuntDouble::getProperty(const string& propName){

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines