Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 10, 2011, 11:34:20 PM (14 years ago)
Author:
landauf
Message:

added "safe mode" feature to FunctorMember: if enabled, the functor acts like a WeakPtr and sets the object-pointer to NULL if the object is deleted, hence the functor can not be executed anymore and instead prints an error message. safe mode is _disabled_ by default.

enabled safe mode for timers

To implement safe mode, FunctorMember<void> (= FunctorStatic) was spezialized and implemented differently. Additionally functors now work only with polymorphic objects due to a dynamic cast, hence XMLPortVariableHelperClass and Magazine got a virtual destructor.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/libraries/tools/Timer.h

    r7545 r7851  
    117117                this->time_ = this->interval_;
    118118                this->bKillAfterCall_ = bKillAfterCall;
     119
     120                executor->getFunctor()->setSafeMode(true);
    119121            }
    120122
Note: See TracChangeset for help on using the changeset viewer.