Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6035


Ignore:
Timestamp:
Nov 5, 2009, 8:19:55 AM (15 years ago)
Author:
rgrieder
Message:

Fixed program termination segfault in the trunk

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

Legend:

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

    r5929 r6035  
    4747        getManagersByScope().insert(std::make_pair(manager->scope_, manager));
    4848    }
    49 
    50     /*static*/ void ScopedSingletonManager::removeManager(ScopedSingletonManager* manager)
    51     {
    52         getManagers().erase(getManagers().find(manager->className_));
    53         for (ManagerMultiMap::iterator it = getManagersByScope().lower_bound(manager->scope_); it != getManagersByScope().upper_bound(manager->scope_);)
    54             if (it->second == manager)
    55                 getManagersByScope().erase(it++);
    56             else
    57                 ++it;
    58     }
    5949}
  • code/trunk/src/libraries/core/ScopedSingletonManager.h

    r5929 r6035  
    5252            virtual ~ScopedSingletonManager() { }
    5353            static void addManager(ScopedSingletonManager* manager);
    54             static void removeManager(ScopedSingletonManager* manager);
    5554
    5655            template<ScopeID::Value scope>
     
    8685        ~ClassScopedSingletonManager()
    8786        {
    88             //assert(singletonPtr_ == NULL); // Might get triggered in the SignalHandler
    89             ScopedSingletonManager::removeManager(this);
    9087        }
    9188
     
    140137        ~ClassScopedSingletonManager()
    141138        {
    142             assert(singletonPtr_ == NULL);
    143             ScopedSingletonManager::removeManager(this);
    144139        }
    145140
Note: See TracChangeset for help on using the changeset viewer.