Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5111 in orxonox.OLD for trunk/src/lib/physics/physics_engine.cc


Ignore:
Timestamp:
Aug 23, 2005, 11:13:56 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: reverted the last steps, because they created a huge pack of seg-faults

File:
1 edited

Legend:

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

    r5110 r5111  
    5252{
    5353  // delete all PhysicsConnections that are still in existence
    54 //   tIterator<PhysicsConnection>* itPC = this->connections->getIterator();
    55 //   PhysicsConnection* enumPC = itPC->firstElement();
    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->firstElement();
    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->firstElement();
    79 //   while (enumF)
    80 //   {
    81 //     delete enumF;
    82 //
    83 //     enumF = itF->nextElement();
    84 //   }
    85 //   delete itF;
    86 //   delete this->fields;
     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;
    8787
    8888
     
    163163{
    164164  tIterator<PhysicsInterface>* tmpIt = interfaces->getIterator();
    165   PhysicsInterface* tmpInt = tmpIt->firstElement();
     165  PhysicsInterface* tmpInt = tmpIt->nextElement();
    166166  while(tmpInt)
    167167  {
     
    206206{
    207207  tIterator<Field>* tmpIt = fields->getIterator();
    208   Field* tmpField = tmpIt->firstElement();
     208  Field* tmpField = tmpIt->nextElement();
    209209  while(tmpField)
    210210  {
     
    251251{
    252252  tIterator<PhysicsConnection>* tmpIt = connections->getIterator();
    253   PhysicsConnection* tmpConn = tmpIt->firstElement();
     253  PhysicsConnection* tmpConn = tmpIt->nextElement();
    254254  while(tmpConn)
    255255  {
     
    278278  meaning let the fields work */
    279279  tIterator<PhysicsConnection>* itPC = this->connections->getIterator();
    280   PhysicsConnection* enumPC = itPC->firstElement();
     280  PhysicsConnection* enumPC = itPC->nextElement();
    281281  while (enumPC)
    282282    {
     
    289289  /* actually tick all the PhysicsInterfaces. Move the objects around */
    290290  tIterator<PhysicsInterface>* itPI = this->interfaces->getIterator();
    291   PhysicsInterface* enumPI = itPI->firstElement();
     291  PhysicsInterface* enumPI = itPI->nextElement();
    292292  while (enumPI)
    293293    {
Note: See TracChangeset for help on using the changeset viewer.