Index: code/branches/core6/src/libraries/core/ClassTreeMask.cc
===================================================================
--- code/branches/core6/src/libraries/core/ClassTreeMask.cc	(revision 9604)
+++ code/branches/core6/src/libraries/core/ClassTreeMask.cc	(revision 9606)
@@ -849,5 +849,5 @@
         // If there is a first subclass, move the object-iterator to the first object of this class. Else go to the end
         if (this->subclassIterator_ != this->subclasses_.end())
-            this->objectIterator_ = this->subclassIterator_->first->getObjects()->begin();
+            this->objectIterator_ = Context::getRootContext()->getObjectList(this->subclassIterator_->first)->begin();
         else
             this->objectIterator_ = ObjectList<BaseObject>::end();
@@ -881,5 +881,5 @@
                     // Check if there really is a next class. If yes, move the object-iterator to the first object
                     if (this->subclassIterator_ != this->subclasses_.end())
-                        this->objectIterator_ = this->subclassIterator_->first->getObjects()->begin();
+                        this->objectIterator_ = Context::getRootContext()->getObjectList(this->subclassIterator_->first)->begin();
                     else
                         return (*this);
Index: code/branches/core6/src/libraries/core/class/Identifier.cc
===================================================================
--- code/branches/core6/src/libraries/core/class/Identifier.cc	(revision 9604)
+++ code/branches/core6/src/libraries/core/class/Identifier.cc	(revision 9606)
@@ -52,6 +52,4 @@
         : classID_(IdentifierManager::classIDCounter_s++)
     {
-        this->objects_ = new ObjectListBase();
-
         this->bCreatedOneObject_ = false;
         this->bSetName_ = false;
@@ -70,6 +68,4 @@
     Identifier::~Identifier()
     {
-        delete this->objects_;
-
         if (this->factory_)
             delete this->factory_;
Index: code/branches/core6/src/libraries/core/class/Identifier.h
===================================================================
--- code/branches/core6/src/libraries/core/class/Identifier.h	(revision 9604)
+++ code/branches/core6/src/libraries/core/class/Identifier.h	(revision 9606)
@@ -57,12 +57,4 @@
 
     OrxonoxClass* other = object->getIdentifier()->fabricate(0);                // fabricates a new instance of MyClass
-
-
-    // iterate through all objects of type MyClass:
-    ObjectListBase* objects = object->getIdentifier()->getObjects();            // get a pointer to the object-list
-    int count;
-    for (Iterator<MyClass> it = objects.begin(); it != objects.end(); ++it)     // iterate through the objects
-        ++count;
-    orxout() << count << endl;                                                  // prints "2" because we created 2 instances of MyClass so far
 
 
@@ -91,5 +83,6 @@
 #include "util/Output.h"
 #include "core/object/ObjectList.h"
-#include "core/object/ObjectListBase.h"
+#include "core/object/Listable.h"
+#include "core/object/Context.h"
 #include "IdentifierManager.h"
 #include "Super.h"
@@ -126,7 +119,4 @@
             /// Returns the unique ID of the class.
             ORX_FORCEINLINE unsigned int getClassID() const { return this->classID_; }
-
-            /// Returns the list of all existing objects of this class.
-            inline ObjectListBase* getObjects() const { return this->objects_; }
 
             /// Sets the Factory.
@@ -231,6 +221,4 @@
             /// Returns the direct children of the class the Identifier belongs to.
             inline std::set<const Identifier*>& getDirectChildrenIntern() const { return this->directChildren_; }
-
-            ObjectListBase* objects_;                                      //!< The list of all objects of this class
 
         private:
@@ -424,8 +412,7 @@
      */
     template <class T>
-    void ClassIdentifier<T>::addObjectToList(T* object, Listable*)
-    {
-        orxout(verbose, context::object_list) << "Added object to " << this->getName() << "-list." << endl;
-        object->elements_.push_back(this->objects_->add(object));
+    void ClassIdentifier<T>::addObjectToList(T* object, Listable* listable)
+    {
+        listable->getContext()->addObject(object);
     }
 
Index: code/branches/core6/src/libraries/core/object/Context.cc
===================================================================
--- code/branches/core6/src/libraries/core/object/Context.cc	(revision 9604)
+++ code/branches/core6/src/libraries/core/object/Context.cc	(revision 9606)
@@ -33,4 +33,5 @@
 
 #include "Context.h"
+#include "core/class/Identifier.h"
 
 namespace orxonox
@@ -49,3 +50,13 @@
         return &rootContext;
     }
+
+    ObjectListBase* Context::getObjectList(const Identifier* identifier)
+    {
+        unsigned int classID = identifier->getClassID();
+        if (classID >= this->objectLists_.size())
+            this->objectLists_.resize(classID + 1);
+        if (!this->objectLists_[classID])
+            this->objectLists_[classID] = new ObjectListBase();
+        return this->objectLists_[classID];
+    }
 }
Index: code/branches/core6/src/libraries/core/object/Context.h
===================================================================
--- code/branches/core6/src/libraries/core/object/Context.h	(revision 9604)
+++ code/branches/core6/src/libraries/core/object/Context.h	(revision 9606)
@@ -37,4 +37,8 @@
 #include "core/CorePrereqs.h"
 
+#include <vector>
+
+#include "ObjectListBase.h"
+
 namespace orxonox
 {
@@ -42,4 +46,6 @@
     {
         public:
+            static Context* getRootContext();
+
             Context(Context* context);
             virtual ~Context();
@@ -48,8 +54,22 @@
                 { return this->parentContext_; }
 
-            static Context* getRootContext();
+            ObjectListBase* getObjectList(const Identifier* identifier);
+
+            template <class T>
+            inline ObjectListBase* getObjectList()
+                { return this->getObjectList(ClassIdentifier<T>::getIdentifier()); }
+
+            template <class T>
+            inline void addObject(T* object)
+            {
+                ObjectListBaseElement* element = this->getObjectList<T>()->add(object);
+                object->elements_.push_back(element);
+                if (this->getParentContext())
+                    this->getParentContext()->addObject(object);
+            }
 
         private:
             Context* parentContext_;
+            std::vector<ObjectListBase*> objectLists_;
     };
 }
Index: code/branches/core6/src/libraries/core/object/Listable.cc
===================================================================
--- code/branches/core6/src/libraries/core/object/Listable.cc	(revision 9604)
+++ code/branches/core6/src/libraries/core/object/Listable.cc	(revision 9606)
@@ -34,4 +34,5 @@
 #include "Listable.h"
 #include "ObjectListBase.h"
+#include "Context.h"
 
 namespace orxonox
@@ -42,4 +43,5 @@
     Listable::Listable()
     {
+        this->context_ = Context::getRootContext();
         this->elements_.reserve(6);
     }
Index: code/branches/core6/src/libraries/core/object/Listable.h
===================================================================
--- code/branches/core6/src/libraries/core/object/Listable.h	(revision 9604)
+++ code/branches/core6/src/libraries/core/object/Listable.h	(revision 9606)
@@ -49,6 +49,5 @@
     class _CoreExport Listable : virtual public Identifiable
     {
-        template <class T>
-        friend class ClassIdentifier;
+        friend class Context;
 
         public:
@@ -58,5 +57,11 @@
             void unregisterObject();
 
+            inline void setContext(Context* context)
+                { this->context_ = context; }
+            inline Context* getContext() const
+                { return this->context_; }
+
         private:
+            Context* context_;                             //!< The object will register itself in the object lists of this context
             std::vector<ObjectListBaseElement*> elements_; //!< The corresponding ObjectListElements in all object lists the object is registered in
     };
Index: code/branches/core6/src/libraries/core/object/ObjectList.h
===================================================================
--- code/branches/core6/src/libraries/core/object/ObjectList.h	(revision 9604)
+++ code/branches/core6/src/libraries/core/object/ObjectList.h	(revision 9606)
@@ -49,4 +49,5 @@
 #include "ObjectListBase.h"
 #include "ObjectListIterator.h"
+#include "Context.h"
 
 namespace orxonox
@@ -71,5 +72,5 @@
             inline static size_t size()
             {
-                return ClassIdentifier<T>::getIdentifier()->getObjects()->size();
+                return Context::getRootContext()->getObjectList<T>()->size();
             }
 
@@ -77,5 +78,5 @@
             inline static ObjectListElement<T>* begin()
             {
-                ObjectListBase* list = ClassIdentifier<T>::getIdentifier()->getObjects();
+                ObjectListBase* list = Context::getRootContext()->getObjectList<T>();
                 return static_cast<ObjectListElement<T>*>(list->begin());
             }
@@ -84,5 +85,5 @@
             inline static ObjectListElement<T>* end()
             {
-                ObjectListBase* list = ClassIdentifier<T>::getIdentifier()->getObjects();
+                ObjectListBase* list = Context::getRootContext()->getObjectList<T>();
                 return static_cast<ObjectListElement<T>*>(list->end());
             }
@@ -91,5 +92,5 @@
             inline static ObjectListElement<T>* rbegin()
             {
-                ObjectListBase* list = ClassIdentifier<T>::getIdentifier()->getObjects();
+                ObjectListBase* list = Context::getRootContext()->getObjectList<T>();
                 return static_cast<ObjectListElement<T>*>(list->rbegin());
             }
@@ -98,5 +99,5 @@
             inline static ObjectListElement<T>* rend()
             {
-                ObjectListBase* list = ClassIdentifier<T>::getIdentifier()->getObjects();
+                ObjectListBase* list = Context::getRootContext()->getObjectList<T>();
                 return static_cast<ObjectListElement<T>*>(list->rend());
             }
Index: code/branches/core6/src/libraries/core/object/ObjectListBase.cc
===================================================================
--- code/branches/core6/src/libraries/core/object/ObjectListBase.cc	(revision 9604)
+++ code/branches/core6/src/libraries/core/object/ObjectListBase.cc	(revision 9606)
@@ -89,4 +89,7 @@
         }
 
+        if (element->objectBase_)
+            orxout(verbose, context::object_list) << "Added object to " << element->objectBase_->getIdentifier()->getName() << "-list." << endl;
+
         if (!this->last_)
         {
Index: code/branches/core6/src/libraries/core/object/ObjectListBase.h
===================================================================
--- code/branches/core6/src/libraries/core/object/ObjectListBase.h	(revision 9604)
+++ code/branches/core6/src/libraries/core/object/ObjectListBase.h	(revision 9606)
@@ -124,11 +124,11 @@
 
             /// Returns a pointer to the first element in the list. Works only with Iterator.
-            inline ObjectListBaseElement* begin() { return this->first_; }
+            inline ObjectListBaseElement* begin() const { return this->first_; }
             /// Returns a pointer to the element after the last element in the list. Works only with Iterator.
-            inline ObjectListBaseElement* end() { return 0; }
+            inline ObjectListBaseElement* end() const { return 0; }
             /// Returns a pointer to the last element in the list. Works only with Iterator.
-            inline ObjectListBaseElement* rbegin() { return this->last_; }
+            inline ObjectListBaseElement* rbegin() const { return this->last_; }
             /// Returns a pointer to the element in front of the first element in the list. Works only with Iterator.
-            inline ObjectListBaseElement* rend() { return 0; }
+            inline ObjectListBaseElement* rend() const { return 0; }
 
             inline void registerRemovalListener(ObjectListElementRemovalListener* listener) { this->listeners_.push_back(listener); }
