Index: orxonox/trunk/src/lib/collision_detection/bounding_volume.cc
===================================================================
--- orxonox/trunk/src/lib/collision_detection/bounding_volume.cc	(revision 4813)
+++ orxonox/trunk/src/lib/collision_detection/bounding_volume.cc	(revision 4814)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -25,8 +25,9 @@
    \brief standard constructor
 */
-BoundingVolume::BoundingVolume () 
+BoundingVolume::BoundingVolume ()
 {
-   this->setClassID(CL_BOUNDING_VOLUME, "BoundingVolume"); 
+   this->setClassID(CL_BOUNDING_VOLUME, "BoundingVolume");
    this->center = new Vector();
+   this->bOrigVertices = false;
 }
 
@@ -36,5 +37,5 @@
 
 */
-BoundingVolume::~BoundingVolume () 
+BoundingVolume::~BoundingVolume ()
 {
   // delete what has to be deleted here
Index: orxonox/trunk/src/lib/collision_detection/bounding_volume.h
===================================================================
--- orxonox/trunk/src/lib/collision_detection/bounding_volume.h	(revision 4813)
+++ orxonox/trunk/src/lib/collision_detection/bounding_volume.h	(revision 4814)
@@ -36,4 +36,5 @@
     sVec3D*             vertices;                   //!< if CD_STORE_VERTICES enabled, this is the place, where the vert. will be sotred
     int                 numOfVertices;              //!< number of vertices in the vertices buffer
+    bool                bOrigVertices;              //!< is true if the vertices pointer points to the original model data - only important for deleting
 };
 
Index: orxonox/trunk/src/lib/collision_detection/bv_tree_node.cc
===================================================================
--- orxonox/trunk/src/lib/collision_detection/bv_tree_node.cc	(revision 4813)
+++ orxonox/trunk/src/lib/collision_detection/bv_tree_node.cc	(revision 4814)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -24,7 +24,7 @@
    \brief standard constructor
 */
-BVTreeNode::BVTreeNode () 
+BVTreeNode::BVTreeNode ()
 {
-   this->setClassID(CL_BV_TREE_NODE, "BVTreeNode"); 
+   this->setClassID(CL_BV_TREE_NODE, "BVTreeNode");
 
 }
@@ -35,7 +35,6 @@
 
 */
-BVTreeNode::~BVTreeNode () 
+BVTreeNode::~BVTreeNode ()
 {
-  // delete what has to be deleted here
 }
 
Index: orxonox/trunk/src/lib/collision_detection/obb.cc
===================================================================
--- orxonox/trunk/src/lib/collision_detection/obb.cc	(revision 4813)
+++ orxonox/trunk/src/lib/collision_detection/obb.cc	(revision 4814)
@@ -32,4 +32,5 @@
    this->halfLength = new float[3];
    this->bCollided = false;
+   this->vertices = NULL;
 }
 
@@ -41,7 +42,14 @@
 OBB::~OBB ()
 {
-  // delete what has to be deleted here
   delete [] this->axis;
   delete [] this->halfLength;
+
+  if( this->vertices && !this->bOrigVertices)
+  {
+//     for(int i = 0; i < this->numOfVertices; i++)
+//       delete [] this->vertices[i];
+    delete this->vertices;
+    this->vertices = NULL;
+  }
 }
 
Index: orxonox/trunk/src/lib/collision_detection/obb.h
===================================================================
--- orxonox/trunk/src/lib/collision_detection/obb.h	(revision 4813)
+++ orxonox/trunk/src/lib/collision_detection/obb.h	(revision 4814)
@@ -35,5 +35,5 @@
   float            covarianceMatrix[3][3];     //!< the covariance matrix
 
-  bool                bCollided;                  //!< is true if this obb has collided
+  bool             bCollided;                  //!< is true if this obb has collided
 
 };
Index: orxonox/trunk/src/lib/collision_detection/obb_tree.cc
===================================================================
--- orxonox/trunk/src/lib/collision_detection/obb_tree.cc	(revision 4813)
+++ orxonox/trunk/src/lib/collision_detection/obb_tree.cc	(revision 4814)
@@ -87,5 +87,5 @@
 OBBTree::~OBBTree ()
 {
-  // delete what has to be deleted here
+  delete this->rootNode;
 }
 
Index: orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc
===================================================================
--- orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc	(revision 4813)
+++ orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc	(revision 4814)
@@ -50,4 +50,5 @@
   this->nodeLeft = NULL;
   this->nodeRight = NULL;
+  this->bvElement = NULL;
 
   if(coMat == NULL)
@@ -79,10 +80,18 @@
 OBBTreeNode::~OBBTreeNode ()
 {
-
-  delete [] this->vertices;
-
-  delete this->bvElement;
-  delete this->nodeLeft;
-  delete this->nodeRight;
+  if( this->nodeLeft)
+  {
+    delete this->nodeLeft;
+    this->nodeLeft = NULL;
+  }
+  if( this->nodeRight)
+  {
+    delete this->nodeRight;
+    this->nodeRight = NULL;
+  }
+  printf("deleting nr %i obbTreeNode\n", this->getIndex());
+  if( this->bvElement)
+    delete this->bvElement;
+  this->bvElement = NULL;
 }
 
@@ -113,4 +122,7 @@
   PRINTF(3)("Calculated attributes3\n");
 
+  /* if this is the first node, the vertices data are the original ones of the model itself, so dont delete them in cleanup */
+  if( this->treeIndex == 1)
+    this->bvElement->bOrigVertices = true;
 
   if( likely( this->depth > 0))
Index: orxonox/trunk/src/world_entities/world_entity.cc
===================================================================
--- orxonox/trunk/src/world_entities/world_entity.cc	(revision 4813)
+++ orxonox/trunk/src/world_entities/world_entity.cc	(revision 4814)
@@ -49,4 +49,6 @@
   if (this->model)
     ResourceManager::getInstance()->unload(this->model);
+  if( this->obbTree)
+    delete this->obbTree;
 }
 
