Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1058 for code/trunk/src/core


Ignore:
Timestamp:
Apr 14, 2008, 1:17:10 PM (17 years ago)
Author:
landauf
Message:

something that just came through my mind: maybe this will help preventing a segfault when we'll destroy all singletons after program termination.

Location:
code/trunk/src/core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/core/CoreSettings.cc

    r1056 r1058  
    4949    }
    5050
     51    /**
     52        @brief Sets the bool to true to avoid static functions accessing a deleted object.
     53    */
     54    CoreSettings::~CoreSettings()
     55    {
     56        isCreatingCoreSettings() = true;
     57    }
     58
     59    /**
     60        @brief Returns true if the CoreSettings instance is not yet ready and the static functions have to return a default value.
     61    */
    5162    bool& CoreSettings::isCreatingCoreSettings()
    5263    {
  • code/trunk/src/core/CoreSettings.h

    r1056 r1058  
    6262            CoreSettings();
    6363            CoreSettings(const CoreSettings& other) {}
    64             virtual ~CoreSettings() {}
     64            virtual ~CoreSettings();
    6565
    6666            int softDebugLevel_;                            //!< The debug level
Note: See TracChangeset for help on using the changeset viewer.