Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4749 in orxonox.OLD for orxonox/trunk/src/lib


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

orxonox/trunk: cleaned out the still loaded PhysicsConnections

File:
1 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}
Note: See TracChangeset for help on using the changeset viewer.