Index: code/branches/core7/src/libraries/core/CoreIncludes.h
===================================================================
--- code/branches/core7/src/libraries/core/CoreIncludes.h	(revision 10359)
+++ code/branches/core7/src/libraries/core/CoreIncludes.h	(revision 10360)
@@ -84,4 +84,5 @@
 #include "object/ClassFactory.h"
 #include "object/ObjectList.h"
+#include "module/StaticallyInitializedInstance.h"
 
 // resolve macro conflict on windows
@@ -126,5 +127,5 @@
 */
 #define RegisterClassWithFactory(ClassName, FactoryInstance, bLoadable) \
-    Identifier& _##ClassName##Identifier = orxonox::registerClass<ClassName>(#ClassName, FactoryInstance, bLoadable)
+    Identifier& _##ClassName##Identifier = (new orxonox::SI_I(orxonox::registerClass<ClassName>(#ClassName, FactoryInstance, bLoadable)))->getIdentifier()
 
 /**
@@ -152,5 +153,5 @@
      */
     template <class T>
-    inline Identifier& registerClass(const std::string& name, ClassFactory<T>* factory, bool bLoadable = true)
+    inline Identifier* registerClass(const std::string& name, ClassFactory<T>* factory, bool bLoadable = true)
     {
         return registerClass<T>(name, static_cast<Factory*>(factory), bLoadable);
@@ -164,5 +165,5 @@
      */
     template <class T>
-    inline Identifier& registerClass(const std::string& name, Factory* factory, bool bLoadable = true)
+    inline Identifier* registerClass(const std::string& name, Factory* factory, bool bLoadable = true)
     {
         orxout(verbose, context::misc::factory) << "Create entry for " << name << " in Factory." << endl;
@@ -170,5 +171,5 @@
         identifier->setFactory(factory);
         identifier->setLoadable(bLoadable);
-        return *identifier;
+        return identifier;
     }
 
@@ -211,4 +212,20 @@
         return ClassIdentifier<T>::getIdentifier();
     }
+
+    class _CoreExport StaticallyInitializedIdentifier : public StaticallyInitializedInstance
+    {
+        public:
+            StaticallyInitializedIdentifier(Identifier* identifier) : identifier_(identifier) {}
+
+            virtual void load() {}
+
+            inline Identifier& getIdentifier()
+                { return *this->identifier_; }
+
+        private:
+            Identifier* identifier_;
+    };
+
+    typedef StaticallyInitializedIdentifier SI_I;
 }
 
Index: code/branches/core7/test/core/class/IdentifierClassHierarchyTest.cc
===================================================================
--- code/branches/core7/test/core/class/IdentifierClassHierarchyTest.cc	(revision 10359)
+++ code/branches/core7/test/core/class/IdentifierClassHierarchyTest.cc	(revision 10360)
@@ -135,8 +135,8 @@
                     registerClass("OrxonoxInterface", new ClassFactoryNoArgs<OrxonoxInterface>());
                     registerClass("OrxonoxClass", new ClassFactoryNoArgs<OrxonoxClass>());
-                    registerClass("BaseInterface1", static_cast<ClassFactory<BaseInterface1>*>(NULL), false).inheritsFrom(Class(OrxonoxInterface));
-                    registerClass("BaseInterface2", static_cast<ClassFactory<BaseInterface2>*>(NULL), false).inheritsFrom(Class(OrxonoxInterface));
-                    registerClass("Interface1", static_cast<ClassFactory<Interface1>*>(NULL), false).inheritsFrom(Class(BaseInterface1));
-                    registerClass("Interface2", static_cast<ClassFactory<Interface2>*>(NULL), false).inheritsFrom(Class(BaseInterface2));
+                    registerClass("BaseInterface1", static_cast<ClassFactory<BaseInterface1>*>(NULL), false)->inheritsFrom(Class(OrxonoxInterface));
+                    registerClass("BaseInterface2", static_cast<ClassFactory<BaseInterface2>*>(NULL), false)->inheritsFrom(Class(OrxonoxInterface));
+                    registerClass("Interface1", static_cast<ClassFactory<Interface1>*>(NULL), false)->inheritsFrom(Class(BaseInterface1));
+                    registerClass("Interface2", static_cast<ClassFactory<Interface2>*>(NULL), false)->inheritsFrom(Class(BaseInterface2));
                     registerClass("BaseClass", new ClassFactoryNoArgs<BaseClass>());
                     registerClass("Class0", new ClassFactoryNoArgs<Class0>());
Index: code/branches/core7/test/core/class/IdentifierExternalClassHierarchyTest.cc
===================================================================
--- code/branches/core7/test/core/class/IdentifierExternalClassHierarchyTest.cc	(revision 10359)
+++ code/branches/core7/test/core/class/IdentifierExternalClassHierarchyTest.cc	(revision 10360)
@@ -46,5 +46,5 @@
                     registerClass("Context", new ClassFactoryWithContext<Context>());
                     registerClass("Listable", new ClassFactoryWithContext<Listable>());
-                    registerClass("Interface", static_cast<ClassFactory<Interface>*>(NULL), false).inheritsFrom(Class(Identifiable));
+                    registerClass("Interface", static_cast<ClassFactory<Interface>*>(NULL), false)->inheritsFrom(Class(Identifiable));
                     registerClass("BaseClass", new ClassFactoryNoArgs<BaseClass>());
                     registerClass("RealClass", new ClassFactoryNoArgs<RealClass>());
Index: code/branches/core7/test/core/class/IdentifierSimpleClassHierarchyTest.cc
===================================================================
--- code/branches/core7/test/core/class/IdentifierSimpleClassHierarchyTest.cc	(revision 10359)
+++ code/branches/core7/test/core/class/IdentifierSimpleClassHierarchyTest.cc	(revision 10360)
@@ -51,5 +51,5 @@
                     registerClass("OrxonoxInterface", new ClassFactoryNoArgs<OrxonoxInterface>());
                     registerClass("OrxonoxClass", new ClassFactoryNoArgs<OrxonoxClass>());
-                    registerClass("Interface", static_cast<ClassFactory<Interface>*>(NULL), false).inheritsFrom(Class(OrxonoxInterface));
+                    registerClass("Interface", static_cast<ClassFactory<Interface>*>(NULL), false)->inheritsFrom(Class(OrxonoxInterface));
                     registerClass("BaseClass", new ClassFactoryNoArgs<BaseClass>());
                     registerClass("RealClass", new ClassFactoryNoArgs<RealClass>());
