Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4749 in orxonox.OLD


Ignore:
Timestamp:
Jul 1, 2005, 4:45:30 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: cleaned out the still loaded PhysicsConnections

Location:
orxonox/trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/physics/physics_engine.cc

    r4746 r4749  
    5151PhysicsEngine::~PhysicsEngine()
    5252{
     53  // delete all PhysicsConnections that are still in existence
     54  tIterator<PhysicsConnection>* itPC = this->connections->getIterator();
     55  PhysicsConnection* enumPC = itPC->nextElement();
     56  while (enumPC)
     57  {
     58    delete enumPC;
     59    enumPC = itPC->nextElement();
     60  }
     61  delete itPC;
     62  delete this->connections;
     63
     64  // delete all PhysicsInterfaces, still in existence (this could be dangerous)
     65  tIterator<PhysicsInterface>* itPI = this->interfaces->getIterator();
     66  PhysicsInterface* enumPI = itPI->nextElement();
     67  while (enumPI)
     68  {
     69    delete enumPI;
     70
     71    enumPI = itPI->nextElement();
     72  }
     73  delete itPI;
     74  delete this->interfaces;
     75
     76  // delete all PhysicsFields, still in existence (this could be dangerous)
     77  tIterator<Field>* itF = this->fields->getIterator();
     78  Field* enumF = itF->nextElement();
     79  while (enumF)
     80  {
     81    delete enumF;
     82
     83    enumF = itF->nextElement();
     84  }
     85  delete itF;
     86  delete this->fields;
     87
     88
    5389  PhysicsEngine::singletonRef = NULL;
    5490}
  • orxonox/trunk/src/orxonox.cc

    r4748 r4749  
    8383  delete TextEngine::getInstance();
    8484  delete EventHandler::getInstance();
     85  delete Factory::getFirst();
    8586
    8687  ClassList::debug();
Note: See TracChangeset for help on using the changeset viewer.