Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 22, 2011, 9:28:56 PM (14 years ago)
Author:
dafrick
Message:

Fixing another potential memory leak.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/modules/pickup/PickupCollection.cc

    r7547 r8305  
    5454        The creator of the object.
    5555    */
    56     PickupCollection::PickupCollection(BaseObject* creator) : BaseObject(creator)
     56    PickupCollection::PickupCollection(BaseObject* creator) : BaseObject(creator), pickupCollectionIdentifier_(NULL)
    5757    {
    5858        RegisterObject(PickupCollection);
     
    7070        Destructor. Iterates through all Pickupables this PickupCollection consists of and destroys them if they haven't been already.
    7171    */
    72     PickupCollection::~PickupCollection()
     72    PickupCollection::~ PickupCollection()
    7373    {
    7474        // Destroy all Pickupables constructing this PickupCollection.
     
    7979        }
    8080        this->pickups_.clear();
     81       
     82        if(this->pickupCollectionIdentifier_ != NULL)
     83            delete this->pickupCollectionIdentifier_;
    8184    }
    8285
Note: See TracChangeset for help on using the changeset viewer.