Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3553 in orxonox.OLD for orxonox/trunk/src/lib/util


Ignore:
Timestamp:
Mar 15, 2005, 12:14:12 AM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: resolved a list deleting problem in tlist.h.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/util/list.h

    r3534 r3553  
    101101template<class T>
    102102tList<T>::~tList ()
    103 {}
     103{
     104  this->currentEl = this->first;
     105  while(this->currentEl != NULL)
     106    {
     107      listElement* le = this->currentEl->next;
     108      //delete this->currentEl->curr;
     109      delete this->currentEl;
     110      this->currentEl = le;
     111    }
     112  this->first = NULL;
     113  this->last = NULL;
     114  this->size = 0;
     115}
     116
    104117
    105118template<class T>
     
    152165    {
    153166      listElement* le = this->currentEl->next;
    154       delete this->currentEl->curr;
     167      //delete this->currentEl->curr;
    155168      delete this->currentEl;
    156169      this->currentEl = le;
Note: See TracChangeset for help on using the changeset viewer.