Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3669 in orxonox.OLD for orxonox/trunk/src/lib/coord


Ignore:
Timestamp:
Mar 30, 2005, 12:06:36 PM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: now garbage collection is working correctlymake

Location:
orxonox/trunk/src/lib/coord
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/coord/null_parent.cc

    r3644 r3669  
    8383  *this->absCoordinate = *this->relCoordinate;
    8484  *this->absDirection = parent->getAbsDir () * *this->relDirection;
    85  
    86   PNode* pn = this->children->enumerate ();
     85
     86  tIterator<PNode>* iterator = this->children->getIterator();
     87  //PNode* pn = this->children->enumerate ();
     88  PNode* pn = iterator->nextElement();
    8789  while( pn != NULL)
    8890    {
     
    9395        pn->parentDirChanged ();
    9496      pn->update (dt);
    95       pn = this->children->nextElement ();
     97      //pn = this->children->nextElement ();
     98      pn = iterator->nextElement();
    9699    }
    97100
  • orxonox/trunk/src/lib/coord/p_node.cc

    r3668 r3669  
    354354{
    355355  pNode->remove();
    356   //this->children->remove (pNode);
     356  this->children->remove (pNode);
    357357  pNode->parent = NULL;
    358358}
     
    378378    }
    379379  delete iterator;
    380   //this->parent->removeChild(this);
     380  this->parent->children->remove(this);
    381381}
    382382
     
    499499 
    500500 
    501   PNode* pn = this->children->enumerate();
     501  tIterator<PNode>* iterator = this->children->getIterator();
     502  //PNode* pn = this->children->enumerate();
     503  PNode* pn = iterator->nextElement();
    502504  while( pn != NULL)
    503505    {
     
    509511
    510512      pn->update(dt);
    511       pn = this->children->nextElement();
    512     }
     513      //pn = this->children->nextElement();
     514      pn = iterator->nextElement();
     515    }
     516  delete iterator;
    513517
    514518  this->timeStamp = timeStamp;
Note: See TracChangeset for help on using the changeset viewer.