Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 26, 2009, 11:16:49 PM (15 years ago)
Author:
landauf
Message:

added SmartPtr class

File:
1 edited

Legend:

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

    r5791 r5804  
    5252    OrxonoxClass::~OrxonoxClass()
    5353    {
     54//        if (!this->requestedDestruction_)
     55//            COUT(2) << "Warning: Destroyed object without destroy() (" << this->getIdentifier()->getName() << ")" << std::endl;
     56
     57        assert(this->referenceCount_ == 0);
     58
    5459        delete this->metaList_;
    5560
     
    6267    void OrxonoxClass::destroy()
    6368    {
    64         if (this->referenceCount_ > 0)
    65             this->requestedDestruction_ = true;
    66         else
     69        this->requestedDestruction_ = true;
     70        if (this->referenceCount_ == 0)
    6771            delete this;
    6872    }
Note: See TracChangeset for help on using the changeset viewer.