Index: code/branches/core7/test/core/class/IdentifiableTest.cc
===================================================================
--- code/branches/core7/test/core/class/IdentifiableTest.cc	(revision 10535)
+++ code/branches/core7/test/core/class/IdentifiableTest.cc	(revision 10544)
@@ -22,4 +22,5 @@
                 virtual void SetUp()
                 {
+                    new IdentifierManager();
                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
                 }
@@ -28,4 +29,5 @@
                 {
                     ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
+                    delete &IdentifierManager::getInstance();
                 }
         };
Index: code/branches/core7/test/core/class/IdentifierClassHierarchyTest.cc
===================================================================
--- code/branches/core7/test/core/class/IdentifierClassHierarchyTest.cc	(revision 10535)
+++ code/branches/core7/test/core/class/IdentifierClassHierarchyTest.cc	(revision 10544)
@@ -142,5 +142,7 @@
                 virtual void SetUp()
                 {
+                    new IdentifierManager();
                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
+                    Context::setRootContext(new Context(NULL));
                     Identifier::initConfigValues_s = false; // TODO: hack!
                     IdentifierManager::getInstance().createClassHierarchy();
@@ -150,5 +152,7 @@
                 {
                     IdentifierManager::getInstance().destroyClassHierarchy();
+                    Context::destroyRootContext();
                     ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
+                    delete &IdentifierManager::getInstance();
                 }
         };
Index: code/branches/core7/test/core/class/IdentifierExternalClassHierarchyTest.cc
===================================================================
--- code/branches/core7/test/core/class/IdentifierExternalClassHierarchyTest.cc	(revision 10535)
+++ code/branches/core7/test/core/class/IdentifierExternalClassHierarchyTest.cc	(revision 10544)
@@ -49,5 +49,7 @@
                 virtual void SetUp()
                 {
+                    new IdentifierManager();
                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
+                    Context::setRootContext(new Context(NULL));
                     Identifier::initConfigValues_s = false; // TODO: hack!
                     IdentifierManager::getInstance().createClassHierarchy();
@@ -57,5 +59,7 @@
                 {
                     IdentifierManager::getInstance().destroyClassHierarchy();
+                    Context::destroyRootContext();
                     ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
+                    delete &IdentifierManager::getInstance();
                 }
         };
Index: code/branches/core7/test/core/class/IdentifierNestedClassHierarchyTest.cc
===================================================================
--- code/branches/core7/test/core/class/IdentifierNestedClassHierarchyTest.cc	(revision 10535)
+++ code/branches/core7/test/core/class/IdentifierNestedClassHierarchyTest.cc	(revision 10544)
@@ -109,5 +109,7 @@
                 virtual void SetUp()
                 {
+                    new IdentifierManager();
                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
+                    Context::setRootContext(new Context(NULL));
                     Identifier::initConfigValues_s = false; // TODO: hack!
                     IdentifierManager::getInstance().createClassHierarchy();
@@ -117,5 +119,7 @@
                 {
                     IdentifierManager::getInstance().destroyClassHierarchy();
+                    Context::destroyRootContext();
                     ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
+                    delete &IdentifierManager::getInstance();
                 }
         };
Index: code/branches/core7/test/core/class/IdentifierSimpleClassHierarchyTest.cc
===================================================================
--- code/branches/core7/test/core/class/IdentifierSimpleClassHierarchyTest.cc	(revision 10535)
+++ code/branches/core7/test/core/class/IdentifierSimpleClassHierarchyTest.cc	(revision 10544)
@@ -51,5 +51,7 @@
                 virtual void SetUp()
                 {
+                    new IdentifierManager();
                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
+                    Context::setRootContext(new Context(NULL));
                     Identifier::initConfigValues_s = false; // TODO: hack!
                     IdentifierManager::getInstance().createClassHierarchy();
@@ -59,5 +61,7 @@
                 {
                     IdentifierManager::getInstance().destroyClassHierarchy();
+                    Context::destroyRootContext();
                     ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
+                    delete &IdentifierManager::getInstance();
                 }
         };
Index: code/branches/core7/test/core/class/IdentifierTest.cc
===================================================================
--- code/branches/core7/test/core/class/IdentifierTest.cc	(revision 10535)
+++ code/branches/core7/test/core/class/IdentifierTest.cc	(revision 10544)
@@ -29,4 +29,5 @@
                 virtual void SetUp()
                 {
+                    new IdentifierManager();
                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
                 }
@@ -35,4 +36,5 @@
                 {
                     ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
+                    delete &IdentifierManager::getInstance();
                 }
         };
Index: code/branches/core7/test/core/class/OrxonoxClassTest.cc
===================================================================
--- code/branches/core7/test/core/class/OrxonoxClassTest.cc	(revision 10535)
+++ code/branches/core7/test/core/class/OrxonoxClassTest.cc	(revision 10544)
@@ -1,4 +1,5 @@
 #include <gtest/gtest.h>
 #include "core/class/OrxonoxClass.h"
+#include "core/class/IdentifierManager.h"
 #include "core/object/Context.h"
 
@@ -17,4 +18,5 @@
                 virtual void SetUp()
                 {
+                    new IdentifierManager();
                     Context::setRootContext(new Context(NULL));
                 }
@@ -22,5 +24,6 @@
                 virtual void TearDown()
                 {
-                    Context::setRootContext(NULL);
+                    Context::destroyRootContext();
+                    delete &IdentifierManager::getInstance();
                 }
         };
Index: code/branches/core7/test/core/class/OrxonoxInterfaceTest.cc
===================================================================
--- code/branches/core7/test/core/class/OrxonoxInterfaceTest.cc	(revision 10535)
+++ code/branches/core7/test/core/class/OrxonoxInterfaceTest.cc	(revision 10544)
@@ -2,4 +2,5 @@
 #include "core/class/OrxonoxInterface.h"
 #include "core/class/OrxonoxClass.h"
+#include "core/class/IdentifierManager.h"
 #include "core/object/Context.h"
 
@@ -32,4 +33,5 @@
                 virtual void SetUp()
                 {
+                    new IdentifierManager();
                     Context::setRootContext(new Context(NULL));
                 }
@@ -37,5 +39,6 @@
                 virtual void TearDown()
                 {
-                    Context::setRootContext(NULL);
+                    Context::destroyRootContext();
+                    delete &IdentifierManager::getInstance();
                 }
         };
Index: code/branches/core7/test/core/class/SubclassIdentifierTest.cc
===================================================================
--- code/branches/core7/test/core/class/SubclassIdentifierTest.cc	(revision 10535)
+++ code/branches/core7/test/core/class/SubclassIdentifierTest.cc	(revision 10544)
@@ -31,17 +31,17 @@
                 virtual void SetUp()
                 {
+                    new IdentifierManager();
                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
+                    Context::setRootContext(new Context(NULL));
                     Identifier::initConfigValues_s = false; // TODO: hack!
                     IdentifierManager::getInstance().createClassHierarchy();
-
-                    Context::setRootContext(new Context(NULL));
                 }
 
                 virtual void TearDown()
                 {
-                    Context::setRootContext(NULL);
-
                     IdentifierManager::getInstance().destroyClassHierarchy();
+                    Context::destroyRootContext();
                     ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
+                    delete &IdentifierManager::getInstance();
                 }
         };
Index: code/branches/core7/test/core/class/SuperTest.cc
===================================================================
--- code/branches/core7/test/core/class/SuperTest.cc	(revision 10535)
+++ code/branches/core7/test/core/class/SuperTest.cc	(revision 10544)
@@ -72,17 +72,17 @@
                 virtual void SetUp()
                 {
+                    new IdentifierManager();
                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
+                    Context::setRootContext(new Context(NULL));
                     Identifier::initConfigValues_s = false; // TODO: hack!
                     IdentifierManager::getInstance().createClassHierarchy();
-
-                    Context::setRootContext(new Context(NULL));
                 }
 
                 virtual void TearDown()
                 {
-                    Context::setRootContext(NULL);
-
                     IdentifierManager::getInstance().destroyClassHierarchy();
+                    Context::destroyRootContext();
                     ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
+                    delete &IdentifierManager::getInstance();
                 }
         };
