Changeset 6035 for code/trunk/src/libraries/core
- Timestamp:
- Nov 5, 2009, 8:19:55 AM (15 years ago)
- Location:
- code/trunk/src/libraries/core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/libraries/core/ScopedSingletonManager.cc
r5929 r6035 47 47 getManagersByScope().insert(std::make_pair(manager->scope_, manager)); 48 48 } 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 else57 ++it;58 }59 49 } -
code/trunk/src/libraries/core/ScopedSingletonManager.h
r5929 r6035 52 52 virtual ~ScopedSingletonManager() { } 53 53 static void addManager(ScopedSingletonManager* manager); 54 static void removeManager(ScopedSingletonManager* manager);55 54 56 55 template<ScopeID::Value scope> … … 86 85 ~ClassScopedSingletonManager() 87 86 { 88 //assert(singletonPtr_ == NULL); // Might get triggered in the SignalHandler89 ScopedSingletonManager::removeManager(this);90 87 } 91 88 … … 140 137 ~ClassScopedSingletonManager() 141 138 { 142 assert(singletonPtr_ == NULL);143 ScopedSingletonManager::removeManager(this);144 139 } 145 140
Note: See TracChangeset
for help on using the changeset viewer.