Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 14, 2009, 12:50:22 AM (14 years ago)
Author:
rgrieder
Message:

Adding OrxonoxClass::preDestroy(). This method gets called when an object is about to be destroyed. The only way to prevent that is by overriding preDestroy() and then creating a SmartPtr to 'this'. This allows us to delay the destruction of an object, for instance when destroyed by the loader.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/src/libraries/core/OrxonoxClass.cc

    r6277 r6348  
    7878        this->requestedDestruction_ = true;
    7979        if (this->referenceCount_ == 0)
    80             delete this;
     80        {
     81            this->preDestroy();
     82            if (this->referenceCount_ == 0)
     83                delete this;
     84        }
    8185    }
    8286
Note: See TracChangeset for help on using the changeset viewer.