[Orxonox-commit 1316] r6034 - code/branches/console/src/libraries/core
rgrieder at orxonox.net
rgrieder at orxonox.net
Thu Nov 5 08:16:13 CET 2009
Author: rgrieder
Date: 2009-11-05 08:16:13 +0100 (Thu, 05 Nov 2009)
New Revision: 6034
Modified:
code/branches/console/src/libraries/core/ScopedSingletonManager.cc
code/branches/console/src/libraries/core/ScopedSingletonManager.h
Log:
Fixed program termination segfault
Modified: code/branches/console/src/libraries/core/ScopedSingletonManager.cc
===================================================================
--- code/branches/console/src/libraries/core/ScopedSingletonManager.cc 2009-11-04 16:47:31 UTC (rev 6033)
+++ code/branches/console/src/libraries/core/ScopedSingletonManager.cc 2009-11-05 07:16:13 UTC (rev 6034)
@@ -46,14 +46,4 @@
getManagers()[manager->className_] = manager;
getManagersByScope().insert(std::make_pair(manager->scope_, manager));
}
-
- /*static*/ void ScopedSingletonManager::removeManager(ScopedSingletonManager* manager)
- {
- getManagers().erase(getManagers().find(manager->className_));
- for (ManagerMultiMap::iterator it = getManagersByScope().lower_bound(manager->scope_); it != getManagersByScope().upper_bound(manager->scope_);)
- if (it->second == manager)
- getManagersByScope().erase(it++);
- else
- ++it;
- }
}
Modified: code/branches/console/src/libraries/core/ScopedSingletonManager.h
===================================================================
--- code/branches/console/src/libraries/core/ScopedSingletonManager.h 2009-11-04 16:47:31 UTC (rev 6033)
+++ code/branches/console/src/libraries/core/ScopedSingletonManager.h 2009-11-05 07:16:13 UTC (rev 6034)
@@ -51,7 +51,6 @@
{ }
virtual ~ScopedSingletonManager() { }
static void addManager(ScopedSingletonManager* manager);
- static void removeManager(ScopedSingletonManager* manager);
template<ScopeID::Value scope>
static void update(const Clock& time)
@@ -85,8 +84,6 @@
~ClassScopedSingletonManager()
{
- //assert(singletonPtr_ == NULL); // Might get triggered in the SignalHandler
- ScopedSingletonManager::removeManager(this);
}
//! Called if the Scope of the Singleton gets active (creates the instance)
@@ -139,8 +136,6 @@
~ClassScopedSingletonManager()
{
- assert(singletonPtr_ == NULL);
- ScopedSingletonManager::removeManager(this);
}
//! Called if the Scope of the Singleton gets active (creates the instance)
More information about the Orxonox-commit
mailing list