Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 2, 2016, 8:59:12 PM (8 years ago)
Author:
landauf
Message:

I think it's sufficient if Timer is a Listable. A timer is often used as a member object in other classes, so it's probably a bad idea to make it a Destroyable since it will neither be deleted with destroy() nor will it survive the lifespan of its parent even if a StrongPtr references it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/modules/pong/PongAI.cc

    r10727 r11018  
    7878    {
    7979        for (std::list<std::pair<Timer*, char> >::iterator it = this->reactionTimers_.begin(); it != this->reactionTimers_.end(); ++it)
    80             it->first->destroy();
     80            delete it->first;
    8181    }
    8282
     
    380380
    381381        // Destroy the timer and remove it from the list
    382         Timer* timer = this->reactionTimers_.front().first;
    383         timer->destroy();
    384 
     382        delete this->reactionTimers_.front().first;
    385383        this->reactionTimers_.pop_front();
    386384    }
Note: See TracChangeset for help on using the changeset viewer.