--- trunk/src/brains/SimInfo.cpp 2005/02/13 20:36:24 328 +++ trunk/src/brains/SimInfo.cpp 2005/03/09 17:30:29 413 @@ -73,7 +73,7 @@ SimInfo::SimInfo(std::vector >::iterator i; @@ -139,19 +139,20 @@ SimInfo::SimInfo(std::vectorselectAll(); } SimInfo::~SimInfo() { - //MemoryUtils::deleteVectorOfPointer(molecules_); - - MemoryUtils::deleteVectorOfPointer(moleculeStamps_); + std::map::iterator i; + for (i = molecules_.begin(); i != molecules_.end(); ++i) { + delete i->second; + } + molecules_.clear(); + + MemoryUtils::deletePointers(moleculeStamps_); delete sman_; delete simParams_; delete forceField_; - delete selectMan_; } int SimInfo::getNGlobalConstraints() { @@ -835,6 +836,11 @@ void SimInfo::setSnapshotManager(SnapshotManager* sman } void SimInfo::setSnapshotManager(SnapshotManager* sman) { + //if (sman_ == sman_) { + // return; + //} + + //delete sman_; sman_ = sman; Molecule* mol;