Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 12, 2011, 5:20:25 PM (14 years ago)
Author:
rgrieder
Message:

Fixed possible bug (avoid using 'this' in the initialiser list unless really necessary).
And fixed memory leak.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/modules/portals/PortalEndPoint.cc

    r8457 r8471  
    1414    std::map<unsigned int, PortalEndPoint *> PortalEndPoint::idMap_s;
    1515
    16     PortalEndPoint::PortalEndPoint(BaseObject* creator) : StaticEntity(creator), id_(0), trigger_(new DistanceMultiTrigger(this))
     16    PortalEndPoint::PortalEndPoint(BaseObject* creator) : StaticEntity(creator), id_(0), trigger_(NULL)
    1717    {
    1818        RegisterObject(PortalEndPoint);
     19        this->trigger_ = new DistanceMultiTrigger(this);
    1920        this->trigger_->setName("portal");
    2021        this->attach(trigger_);
     
    2324    PortalEndPoint::~PortalEndPoint()
    2425    {
    25    
     26        delete this->trigger_;
    2627    }
    2728
Note: See TracChangeset for help on using the changeset viewer.