Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9628


Ignore:
Timestamp:
Aug 9, 2013, 11:28:52 AM (11 years ago)
Author:
landauf
Message:

object list should not delete its elements - they will be deleted by the corresponding Listable object (fixes crash if Context is deleted before the objects in its lists)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core6/src/libraries/core/object/ObjectListBase.cc

    r9608 r9628  
    6868    ObjectListBase::~ObjectListBase()
    6969    {
    70         while (this->first_)
    71             delete this->first_;
     70        ObjectListBaseElement* current = this->first_;
     71        while (current)
     72        {
     73            ObjectListBaseElement* next = current->next_;
     74
     75            current->list_ = 0;
     76            current->next_ = 0;
     77            current->prev_ = 0;
     78
     79            current = next;
     80        }
    7281    }
    7382
Note: See TracChangeset for help on using the changeset viewer.