Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9944


Ignore:
Timestamp:
Jan 3, 2014, 1:29:33 PM (11 years ago)
Author:
landauf
Message:

no Thilo, we don't want to call preDestroy()
made documentation of destroy() and preDestroy() more explicit.

Location:
code/trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/libraries/core/object/Destroyable.cc

    r9570 r9944  
    6161    /**
    6262        @brief Deletes the object if no @ref orxonox::SmartPtr "smart pointers" point to this object. Otherwise schedules the object to be deleted as soon as possible.
     63        Always call destroy() instead of using 'delete' directly, otherwise smart pointers won't work.
    6364    */
    6465    void Destroyable::destroy()
  • code/trunk/src/libraries/core/object/Destroyable.h

    r9570 r9944  
    6363
    6464        protected:
    65             /// This virtual function is called if destroy() is called and no SmartPtr points to this object. Used in some cases to create a new SmartPtr to prevent destruction.
     65            /// This virtual function is called if destroy() is called and no SmartPtr points to this object. Used in some cases to create a new SmartPtr to
     66            /// prevent destruction. Don't call this function directly - use destroy() instead.
    6667            virtual void preDestroy() {}
    6768
  • code/trunk/src/orxonox/gamestates/GSMainMenu.cc

    r9939 r9944  
    8585    {
    8686        if (GameMode::playsSound())
    87             this->ambient_->destroy(); //CHECK Thilo destroy ?preDestroy()? !!!!!!!
     87            this->ambient_->destroy();
    8888
    8989        InputManager::getInstance().destroyState("MainMenuHackery");
Note: See TracChangeset for help on using the changeset viewer.