Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 28, 2009, 3:56:30 PM (16 years ago)
Author:
rgrieder
Message:

Fixed 3 memory leaks (one of them was a true even a true one ;))

  • XMLPortObjectContainers as XMLPort event containers were not deleted in the identifier
  • EventContainers were not deleted in the BaseObject
  • ClassTreeMask clean() operation only erased redundant subnodes instead of deleting them as well
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/libraries/core/BaseObject.cc

    r5738 r5821  
    9999                it->first->removeEvent(this);
    100100
     101            for (std::map<std::string, EventContainer*>::const_iterator it = this->eventContainers_.begin(); it != this->eventContainers_.end(); ++it)
     102                delete it->second;
     103
    101104            if (this->functorSetMainState_)
    102105                delete this->functorSetMainState_;
     
    146149
    147150                XMLPortClassObjectContainer<BaseObject, BaseObject>* container = 0;
    148                 container = (XMLPortClassObjectContainer<BaseObject, BaseObject>*)(this->getIdentifier()->getXMLPortEventContainer(sectionname));
     151                container = static_cast<XMLPortClassObjectContainer<BaseObject, BaseObject>*>(this->getIdentifier()->getXMLPortEventContainer(sectionname));
    149152                if (!container)
    150153                {
Note: See TracChangeset for help on using the changeset viewer.