Index: orxonox/branches/physics/src/util/garbage_collector.cc
===================================================================
--- orxonox/branches/physics/src/util/garbage_collector.cc	(revision 4295)
+++ orxonox/branches/physics/src/util/garbage_collector.cc	(revision 4301)
@@ -25,4 +25,5 @@
 
 #include "list.h"
+#include "object_manager.h"
 
 using namespace std;
@@ -137,5 +138,7 @@
 	  entity->remove();
 	  /* then finaly delete reference */
-	  delete entity;
+	  //delete entity;
+	  ObjectManager::getInstance()->addToDeadList(CL_TEST_BULLET, entity);
+	  ObjectManager::getInstance()->debug();
 	}
       entity = iterator->nextElement();
Index: orxonox/branches/physics/src/util/loading/load_param.cc
===================================================================
--- orxonox/branches/physics/src/util/loading/load_param.cc	(revision 4295)
+++ orxonox/branches/physics/src/util/loading/load_param.cc	(revision 4301)
@@ -10,5 +10,5 @@
 
    ### File Specific:
-   main-programmer: Christian Meyer
+   main-programmer: Benjamin Grauer
    co-programmer: ...
 */
@@ -27,6 +27,8 @@
    \param ... the parameter information
 */
-BaseLoadParam::BaseLoadParam(BaseObject* object, const char* paramName, int paramCount, ...)
-{
+BaseLoadParam::BaseLoadParam(const TiXmlElement* root, BaseObject* object, const char* paramName, int paramCount, ...)
+{
+  this->loadString = grabParameter(root, paramName);
+
   this->paramDesc = NULL;
   if (LoadClassDescription::parametersDescription)
@@ -47,5 +49,5 @@
 	  strcpy(this->paramDesc->types[i], tmpTypeName);
 	}
-      va_end(types);  
+      va_end(types);
 
       int argCount = 0;
Index: orxonox/branches/physics/src/util/loading/load_param.h
===================================================================
--- orxonox/branches/physics/src/util/loading/load_param.h	(revision 4295)
+++ orxonox/branches/physics/src/util/loading/load_param.h	(revision 4301)
@@ -65,7 +65,6 @@
 #define LoadParam1(type1) \
  LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(type1##_TYPE)) \
-  : BaseLoadParam(pt2Object, paramName, 1, type1##_NAME) \
-    { \
-      const char* loadString = grabParameter(root, paramName); \
+   : BaseLoadParam(root, pt2Object, paramName, 1, type1##_NAME)		\
+    { \
       if (loadString != NULL && root != NULL) \
 	(*pt2Object.*function)(type1##_FUNC(loadString)); \
@@ -78,7 +77,6 @@
 #define LoadParam2(type1, type2) \
  LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(type1##_TYPE, type2##_TYPE)) \
-  : BaseLoadParam(pt2Object, paramName, 2, type1##_NAME, type2##_NAME) \
-    { \
-      const char* loadString = grabParameter(root, paramName); \
+   : BaseLoadParam(root, pt2Object, paramName, 2, type1##_NAME, type2##_NAME) \
+    { \
       if (loadString != NULL && root != NULL) \
 	{ \
@@ -98,7 +96,6 @@
 #define LoadParam3(type1, type2, type3) \
  LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(type1##_TYPE, type2##_TYPE, type3##_TYPE))\
-  : BaseLoadParam(pt2Object, paramName, 3, type1##_NAME, type2##_NAME, type3##_NAME) \
-    { \
-      const char* loadString = grabParameter(root, paramName); \
+   : BaseLoadParam(root, pt2Object, paramName, 3, type1##_NAME, type2##_NAME, type3##_NAME) \
+    { \
       if (loadString != NULL && root != NULL) \
 	{ \
@@ -118,7 +115,6 @@
 #define LoadParam4(type1, type2, type3, type4) \
  LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(type1##_TYPE, type2##_TYPE, type3##_TYPE, type4##_TYPE)) \
-  : BaseLoadParam(pt2Object, paramName, 4, type1##_NAME, type2##_NAME, type3##_NAME, type2##_NAME, type4##_NAME) \
-    { \
-      const char* loadString = grabParameter(root, paramName); \
+   : BaseLoadParam(root, pt2Object, paramName, 4, type1##_NAME, type2##_NAME, type3##_NAME, type2##_NAME, type4##_NAME) \
+    { \
       if (loadString != NULL && root != NULL) \
 	{ \
@@ -138,7 +134,6 @@
 #define LoadParam5(type1, type2, type3, type4, type5) \
  LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(type1##_TYPE, type2##_TYPE, type3##_TYPE, type4##_TYPE, type5##_TYPE)) \
-  : BaseLoadParam(pt2Object, paramName, 5, type1##_NAME, type2##_NAME, type3##_NAME, type2##_NAME, type4##_NAME, type5##_NAME) \
-    { \
-      const char* loadString = grabParameter(root, paramName); \
+   : BaseLoadParam(root, pt2Object, paramName, 5, type1##_NAME, type2##_NAME, type3##_NAME, type2##_NAME, type4##_NAME, type5##_NAME) \
+    { \
       if (loadString != NULL && root != NULL) \
 	{ \
@@ -202,9 +197,10 @@
 
  protected:
-  BaseLoadParam(BaseObject* object, const char* paramName, int paramCount, ...);
+  BaseLoadParam(const TiXmlElement* root, BaseObject* object, const char* paramName, int paramCount, ...);
 
  protected:
   LoadClassDescription* classDesc;               //!< The LoadClassDescription of this LoadParameter
   LoadParamDescription* paramDesc;               //!< The LoadParameterDescription of this LoadParameter
+  const char* loadString;                        //!< The string loaded by this LoadParam
 };
 
Index: orxonox/branches/physics/src/util/object_manager.cc
===================================================================
--- orxonox/branches/physics/src/util/object_manager.cc	(revision 4295)
+++ orxonox/branches/physics/src/util/object_manager.cc	(revision 4301)
@@ -11,5 +11,4 @@
    ### File Specific:
    main-programmer: Patrick Boenzli
-   co-programmer: ...
 */
 
@@ -17,4 +16,7 @@
 
 #include "object_manager.h"
+#include "garbage_collector.h"
+#include "list.h"
+
 
 using namespace std;
@@ -26,6 +28,10 @@
 ObjectManager::ObjectManager () 
 {
-   this->setClassName ("ObjectManager");
+  this->setClassName ("ObjectManager");
+  
+  //this->managedObjectList = new BaseObject*[CL_NUMBER];
+  this->managedObjectList = new tList<BaseObject>*[CL_NUMBER];
 
+  this->garbageCollector = GarbageCollector::getInstance();
 }
 
@@ -45,4 +51,5 @@
 }
 
+
 /**
    \brief standard deconstructor
@@ -52,4 +59,52 @@
 {
   ObjectManager::singletonRef = NULL;
+}
 
+
+void ObjectManager::cache(classList index, int number, const BaseObject &copyObject)
+{
+  //this->managedObjectList[index] = new BaseObject[number];
+  this->managedObjectList[index] = new tList<BaseObject>();
+  for(int i = 0; i < number; ++i)
+    {
+      this->managedObjectList[index]->add(new BaseObject(copyObject));
+    }
 }
+
+
+void ObjectManager::addToDeadList(classList index, BaseObject* object)
+{
+  if( likely(this->managedObjectList[index] != NULL))
+    this->managedObjectList[index]->add(object);
+  else
+    PRINTF(0)(" Error: unable to add object to the list nr. %i: no list initialized - ignoring\n", index);
+}
+
+
+BaseObject* ObjectManager::getFromDeadList(classList index, int number)
+{
+  if( likely(this->managedObjectList[index] != NULL))
+    {
+      BaseObject* obj = this->managedObjectList[index]->firstElement();
+      this->managedObjectList[index]->remove(obj);
+      return obj;
+    }
+  else
+    PRINTF(0)(" Error: unable to get object from the list nr. %i: no elements initialized - ignoring\n", index);
+}
+
+
+void ObjectManager::debug()
+{
+  PRINT(0)("\n==========================| ObjectManager::debug() |===\n");
+  PRINT(0)("=  Number of registerable classes: %i\n", CL_NUMBER );  
+  PRINT(0)("=  Currently cached objects: \n");
+  for(int i = 0; i < CL_NUMBER; ++i)
+    {
+      if(this->managedObjectList[i] != NULL)
+	PRINT(0)("=   o Class Nr. %i has cached %i object(s)\n", i, this->managedObjectList[i]->getSize());
+      else
+	PRINT(0)("=   o Class Nr. %i has cached 0 object(s)\n", i);
+    }
+  PRINT(0)("=======================================================\n");
+}
Index: orxonox/branches/physics/src/util/object_manager.h
===================================================================
--- orxonox/branches/physics/src/util/object_manager.h	(revision 4295)
+++ orxonox/branches/physics/src/util/object_manager.h	(revision 4301)
@@ -18,8 +18,13 @@
 #define OM_
 
+#include "class_list.h"
+
+
 class WorldEntity;
+class GarbageCollector;
 
 
 template<class T> class tList; 
+template<class T> class ManagedObject;
 
 //! the object manager itself
@@ -29,6 +34,10 @@
   static ObjectManager* getInstance(void);
   virtual ~ObjectManager(void);
+  
+  void cache(classList index, int number, const BaseObject &copyObject);
+  void addToDeadList(classList index, BaseObject* object);
+  BaseObject* getFromDeadList(classList index, int number = 1);
 
-  void preLoad();
+  void debug();
 
  private:
@@ -36,8 +45,10 @@
   static ObjectManager* singletonRef;
 
-  tList<WorldEntity>* projectileBuffer;            //!< a list of projectiles that is generated at the beginning to make orx faster
+  //BaseObject** managedObjectList;
+  tList<BaseObject>** managedObjectList;
+  GarbageCollector* garbageCollector;
+};
 
 
-};
 
 #endif /* _OBJECT_MANAGER_H */
