Index: /code/trunk/src/core/Identifier.h
===================================================================
--- /code/trunk/src/core/Identifier.h	(revision 2783)
+++ /code/trunk/src/core/Identifier.h	(revision 2784)
@@ -357,9 +357,9 @@
             static ClassIdentifier<T> *getIdentifier(const std::string& name);
             void addObject(T* object);
-            static bool isFirstCall();
 
             void updateConfigValues(bool updateChildren = true) const;
 
         private:
+            static void initialiseIdentifier();
             ClassIdentifier(const ClassIdentifier<T>& identifier) {}    // don't copy
             ClassIdentifier()
@@ -376,70 +376,56 @@
 
     template <class T>
-    ClassIdentifier<T>* ClassIdentifier<T>::classIdentifier_s;
-
-    /**
-        @brief Returns true if the function gets called the first time, false otherwise.
-        @return True if this function got called the first time.
-    */
-    template <class T>
-    bool ClassIdentifier<T>::isFirstCall()
-    {
-        static bool bFirstCall = true;
-
-        if (bFirstCall)
+    ClassIdentifier<T>* ClassIdentifier<T>::classIdentifier_s = 0;
+
+    /**
+        @brief Returns the only instance of this class.
+        @return The unique Identifier
+    */
+    template <class T>
+    ClassIdentifier<T>* ClassIdentifier<T>::getIdentifier()
+    {
+        // check if the static field has already been filled
+        if (ClassIdentifier<T>::classIdentifier_s == 0)
+            ClassIdentifier<T>::initialiseIdentifier();
+
+        return ClassIdentifier<T>::classIdentifier_s;
+    }
+
+    /**
+        @brief Does the same as getIdentifier() but sets the name if this wasn't done yet.
+        @param name The name of this Identifier
+        @return The Identifier
+    */
+    template <class T>
+    ClassIdentifier<T>* ClassIdentifier<T>::getIdentifier(const std::string& name)
+    {
+        ClassIdentifier<T>* identifier = ClassIdentifier<T>::getIdentifier();
+        identifier->setName(name);
+        return identifier;
+    }
+
+    /**
+        @brief Assigns the static field for the identifier singleton.
+    */
+    template <class T>
+    void ClassIdentifier<T>::initialiseIdentifier()
+    {
+        // Get the name of the class
+        std::string name = typeid(T).name();
+
+        // create a new identifier anyway. Will be deleted in Identifier::getIdentifier if not used.
+        ClassIdentifier<T>* proposal = new ClassIdentifier<T>();
+
+        // Get the entry from the map
+        ClassIdentifier<T>::classIdentifier_s = (ClassIdentifier<T>*)Identifier::getIdentifierSingleton(name, proposal);
+
+        if (ClassIdentifier<T>::classIdentifier_s == proposal)
         {
-            bFirstCall = false;
-            return true;
+            COUT(4) << "*** Identifier: Requested Identifier for " << name << " was not yet existing and got created." << std::endl;
         }
         else
         {
-            return false;
+            COUT(4) << "*** Identifier: Requested Identifier for " << name << " was already existing and got assigned." << std::endl;
         }
-    }
-
-    /**
-        @brief Returns the only instance of this class.
-        @return The unique Identifier
-    */
-    template <class T>
-    ClassIdentifier<T>* ClassIdentifier<T>::getIdentifier()
-    {
-        // check if the static field has already been filled
-        if (ClassIdentifier<T>::isFirstCall())
-        {
-            // Get the name of the class
-            std::string name = typeid(T).name();
-
-            // create a new identifier anyway. Will be deleted in Identifier::getIdentifier if not used.
-            ClassIdentifier<T>* proposal = new ClassIdentifier<T>();
-
-            // Get the entry from the map
-            ClassIdentifier<T>::classIdentifier_s = (ClassIdentifier<T>*)Identifier::getIdentifierSingleton(name, proposal);
-
-            if (ClassIdentifier<T>::classIdentifier_s == proposal)
-            {
-                COUT(4) << "*** Identifier: Requested Identifier for " << name << " was not yet existing and got created." << std::endl;
-            }
-            else
-            {
-                COUT(4) << "*** Identifier: Requested Identifier for " << name << " was already existing and got assigned." << std::endl;
-            }
-        }
-
-        // Finally return the unique ClassIdentifier
-        return ClassIdentifier<T>::classIdentifier_s;
-    }
-
-    /**
-        @brief Does the same as getIdentifier() but sets the name if this wasn't done yet.
-        @param name The name of this Identifier
-        @return The Identifier
-    */
-    template <class T>
-    ClassIdentifier<T>* ClassIdentifier<T>::getIdentifier(const std::string& name)
-    {
-        ClassIdentifier<T>* identifier = ClassIdentifier<T>::getIdentifier();
-        identifier->setName(name);
-        return identifier;
     }
 
Index: /code/trunk/src/core/Iterator.h
===================================================================
--- /code/trunk/src/core/Iterator.h	(revision 2783)
+++ /code/trunk/src/core/Iterator.h	(revision 2784)
@@ -75,5 +75,5 @@
                 this->element_ = exp.element_;
                 this->list_ = exp.list_;
-                this->iterator_ = this->list_->registerIterator(this);
+                this->list_->registerIterator(this);
             }
 
@@ -86,5 +86,5 @@
                 this->element_ = other.element_;
                 this->list_ = other.list_;
-                this->iterator_ = this->list_->registerIterator(this);
+                this->list_->registerIterator(this);
             }
 
@@ -98,5 +98,5 @@
                 this->element_ = (element) ? static_cast<ObjectListBaseElement*>(element) : 0;
                 this->list_ = ClassIdentifier<O>::getIdentifier()->getObjects();
-                this->iterator_ = this->list_->registerIterator(this);
+                this->list_->registerIterator(this);
             }
 
@@ -110,5 +110,5 @@
                 this->element_ = (other.element_) ? static_cast<ObjectListBaseElement*>(other.element_) : 0;
                 this->list_ = ClassIdentifier<O>::getIdentifier()->getObjects();
-                this->iterator_ = this->list_->registerIterator(this);
+                this->list_->registerIterator(this);
             }
 
@@ -118,5 +118,5 @@
             inline ~Iterator()
             {
-                this->list_->unregisterIterator(this->iterator_);
+                this->list_->unregisterIterator(this);
             }
 
@@ -128,9 +128,9 @@
             {
                 if (this->list_)
-                    this->list_->unregisterIterator(this->iterator_);
+                    this->list_->unregisterIterator(this);
 
                 this->element_ = exp.element_;
                 this->list_ = exp.list_;
-                this->iterator_ = this->list_->registerIterator(this);
+                this->list_->registerIterator(this);
 
                 return (*this);
@@ -144,9 +144,9 @@
             {
                 if (this->list_)
-                    this->list_->unregisterIterator(this->iterator_);
+                    this->list_->unregisterIterator(this);
 
                 this->element_ = other.element_;
                 this->list_ = other.list_;
-                this->iterator_ = this->list_->registerIterator(this);
+                this->list_->registerIterator(this);
 
                 return (*this);
@@ -161,9 +161,9 @@
             {
                 if (this->list_)
-                    this->list_->unregisterIterator(this->iterator_);
+                    this->list_->unregisterIterator(this);
 
                 this->element_ = (element) ? static_cast<ObjectListBaseElement*>(element) : 0;
                 this->list_ = ClassIdentifier<O>::getIdentifier()->getObjects();
-                this->iterator_ = this->list_->registerIterator(this);
+                this->list_->registerIterator(this);
 
                 return (*this);
@@ -179,9 +179,9 @@
             {
                 if (this->list_)
-                    this->list_->unregisterIterator(this->iterator_);
+                    this->list_->unregisterIterator(this);
 
                 this->element_ = (other.element_) ? (ObjectListBaseElement*)other.element_ : 0;
                 this->list_ = ClassIdentifier<O>::getIdentifier()->getObjects();
-                this->iterator_ = this->list_->registerIterator(this);
+                this->list_->registerIterator(this);
 
                 return (*this);
@@ -300,5 +300,4 @@
             ObjectListBaseElement* element_;       //!< The element the Iterator points at
             ObjectListBase* list_;                 //!< The list wherein the element is
-            std::list<void*>::iterator iterator_;  //!< The iterator in the notifying list of the ObjectList
     };
 
Index: /code/trunk/src/core/ObjectListBase.cc
===================================================================
--- /code/trunk/src/core/ObjectListBase.cc	(revision 2783)
+++ /code/trunk/src/core/ObjectListBase.cc	(revision 2784)
@@ -75,7 +75,7 @@
     void ObjectListBase::notifyIterators(OrxonoxClass* object) const
     {
-        for (std::list<void*>::const_iterator it = this->iterators_.begin(); it != this->iterators_.end(); ++it)
+        for (std::vector<void*>::const_iterator it = this->iterators_.begin(); it != this->iterators_.end(); ++it)
             ((Iterator<OrxonoxClass>*)(*it))->incrementIfEqual(object);
-        for (std::list<void*>::const_iterator it = this->objectListIterators_.begin(); it != this->objectListIterators_.end(); ++it)
+        for (std::vector<void*>::const_iterator it = this->objectListIterators_.begin(); it != this->objectListIterators_.end(); ++it)
             ((ObjectListIterator<OrxonoxClass>*)(*it))->incrementIfEqual(object);
     }
Index: /code/trunk/src/core/ObjectListBase.h
===================================================================
--- /code/trunk/src/core/ObjectListBase.h	(revision 2783)
+++ /code/trunk/src/core/ObjectListBase.h	(revision 2784)
@@ -38,5 +38,5 @@
 #define _ObjectListBase_H__
 
-#include <list>
+#include <vector>
 
 #include "CorePrereqs.h"
@@ -110,8 +110,28 @@
             inline Export rend() { return ObjectListBase::Export(this, 0); }
 
-            inline std::list<void*>::iterator registerIterator(void* iterator) { return this->iterators_.insert(this->iterators_.begin(), iterator); }
-            inline void unregisterIterator(const std::list<void*>::iterator& iterator) { this->iterators_.erase(iterator); }
-            inline std::list<void*>::iterator registerObjectListIterator(void* iterator) { return this->objectListIterators_.insert(this->objectListIterators_.begin(), iterator); }
-            inline void unregisterObjectListIterator(const std::list<void*>::iterator& iterator) { this->objectListIterators_.erase(iterator); }
+            inline void registerIterator(void* iterator) { this->iterators_.push_back(iterator); }
+            inline void unregisterIterator(void* iterator)
+            {
+                for (unsigned int i = 0; i < this->iterators_.size(); ++i)
+                {
+                    if (iterators_[i] == iterator)
+                    {
+                        iterators_.erase(iterators_.begin() + i);
+                        break;
+                    }
+                }
+            }
+            inline void registerObjectListIterator(void* iterator) { this->objectListIterators_.push_back(iterator); }
+            inline void unregisterObjectListIterator(void* iterator)
+            {
+                for (unsigned int i = 0; i < this->objectListIterators_.size(); ++i)
+                {
+                    if (objectListIterators_[i] == iterator)
+                    {
+                        objectListIterators_.erase(objectListIterators_.begin() + i);
+                        break;
+                    }
+                }
+            }
             void notifyIterators(OrxonoxClass* object) const;
 
@@ -122,6 +142,6 @@
             ObjectListBaseElement* first_;         //!< The first element in the list
             ObjectListBaseElement* last_;          //!< The last element in the list
-            std::list<void*> iterators_;           //!< A list of Iterators pointing on an element in this list
-            std::list<void*> objectListIterators_; //!< A list of ObjectListIterators pointing on an element in this list
+            std::vector<void*> iterators_;           //!< A list of Iterators pointing on an element in this list
+            std::vector<void*> objectListIterators_; //!< A list of ObjectListIterators pointing on an element in this list
     };
 }
Index: /code/trunk/src/core/ObjectListIterator.h
===================================================================
--- /code/trunk/src/core/ObjectListIterator.h	(revision 2783)
+++ /code/trunk/src/core/ObjectListIterator.h	(revision 2784)
@@ -65,5 +65,5 @@
             {
                 this->element_ = 0;
-                this->iterator_ = ClassIdentifier<T>::getIdentifier()->getObjects()->registerObjectListIterator(this);
+                ClassIdentifier<T>::getIdentifier()->getObjects()->registerObjectListIterator(this);
             }
 
@@ -75,5 +75,5 @@
             {
                 this->element_ = element;
-                this->iterator_ = ClassIdentifier<T>::getIdentifier()->getObjects()->registerObjectListIterator(this);
+                ClassIdentifier<T>::getIdentifier()->getObjects()->registerObjectListIterator(this);
             }
 
@@ -85,5 +85,5 @@
             {
                 this->element_ = other.element_;
-                this->iterator_ = ClassIdentifier<T>::getIdentifier()->getObjects()->registerObjectListIterator(this);
+                ClassIdentifier<T>::getIdentifier()->getObjects()->registerObjectListIterator(this);
             }
 
@@ -93,5 +93,5 @@
             inline ~ObjectListIterator()
             {
-                ClassIdentifier<T>::getIdentifier()->getObjects()->unregisterObjectListIterator(this->iterator_);
+                ClassIdentifier<T>::getIdentifier()->getObjects()->unregisterObjectListIterator(this);
             }
 
@@ -227,5 +227,4 @@
         private:
             ObjectListElement<T>* element_;        //!< The element the Iterator points at
-            std::list<void*>::iterator iterator_;  //!< The iterator in the notifying list of the ObjectList
     };
 }
