Index: /branches/collision_detection/src/lib/collision_detection/obb.cc
===================================================================
--- /branches/collision_detection/src/lib/collision_detection/obb.cc	(revision 5698)
+++ /branches/collision_detection/src/lib/collision_detection/obb.cc	(revision 5699)
@@ -29,6 +29,5 @@
 {
    this->setClassID(CL_OBB, "OBB");
-   this->axis = new Vector[3];
-   this->halfLength = new float[3];
+   this->halfLength[0] = this->halfLength[1] = this->halfLength[2] = 0.0f;
    this->bCollided = false;
 }
@@ -41,6 +40,4 @@
 OBB::~OBB ()
 {
-  delete [] this->axis;
-  delete [] this->halfLength;
 }
 
Index: /branches/collision_detection/src/lib/collision_detection/obb.h
===================================================================
--- /branches/collision_detection/src/lib/collision_detection/obb.h	(revision 5698)
+++ /branches/collision_detection/src/lib/collision_detection/obb.h	(revision 5699)
@@ -21,5 +21,8 @@
 
 
-  inline Vector* getAxis () const { return this->axis; }
+  inline Vector getAxisX () const { return this->axis[0]; }
+  inline Vector getAxisY () const { return this->axis[1]; }
+  inline Vector getAxisZ () const { return this->axis[2]; }
+
   inline const float* getHalfLength() const { return this->halfLength; }
 
@@ -31,6 +34,6 @@
 
  public:
-  Vector*          axis;                       //!< Axes of oriented box [x,y,z]
-  float*           halfLength;                 //!< Half lengths of the box along the axis
+  Vector           axis[3];                    //!< Axes of oriented box [x,y,z]
+  float            halfLength[3];              //!< Half lengths of the box along the axis
   float            covarianceMatrix[3][3];     //!< the covariance matrix
 
Index: /branches/collision_detection/src/lib/collision_detection/obb_tree_node.cc
===================================================================
--- /branches/collision_detection/src/lib/collision_detection/obb_tree_node.cc	(revision 5698)
+++ /branches/collision_detection/src/lib/collision_detection/obb_tree_node.cc	(revision 5699)
@@ -50,4 +50,6 @@
   this->nodeRight = NULL;
   this->bvElement = NULL;
+  this->tmpVert1 = NULL;
+  this->tmpVert2 = NULL;
 
   if( OBBTreeNode::coMat == NULL)
@@ -93,4 +95,9 @@
     delete this->bvElement;
   this->bvElement = NULL;
+
+  if (this->tmpVert1 != NULL)
+    delete this->tmpVert1;
+  if (this->tmpVert2 != NULL)
+    delete this->tmpVert2;
 }
 
@@ -426,5 +433,5 @@
   vectors
   */
-  Vector*              axis = new Vector[3];                //!< the references to the obb axis
+  Vector axis[3];                //!< the references to the obb axis
 
   Matrix covMat(  box->covarianceMatrix  );
@@ -454,5 +461,7 @@
   axis[1].normalize();
   axis[2].normalize();*/
-  box->axis = axis;
+  box->axis[0] = axis[0];
+  box->axis[1] = axis[1];
+  box->axis[2] = axis[2];
 
 //   PRINTF(0)("-- Got Axis\n");
@@ -476,7 +485,7 @@
   /* now get the axis length */
   Line                ax[3];                                 //!< the axis
-  float*              halfLength = new float[3];             //!< half length of the axis
+  float               halfLength[3];                         //!< half length of the axis
   float               tmpLength;                             //!< tmp save point for the length
-  Plane               p0(box->axis[0], *box->center);       //!< the axis planes
+  Plane               p0(box->axis[0], *box->center);        //!< the axis planes
   Plane               p1(box->axis[1], *box->center);
   Plane               p2(box->axis[2], *box->center);
@@ -561,5 +570,7 @@
 
 
-  box->halfLength = halfLength;
+  box->halfLength[0] = halfLength[0];
+  box->halfLength[1] = halfLength[1];
+  box->halfLength[2] = halfLength[2];
   PRINTF(3)("-- Written Axis to obb\n");
   PRINTF(3)("-- Finished Calculating Attributes\n");
@@ -620,5 +631,5 @@
 
   PRINTF(3)("vertex index: %i, of %i\n", vertexIndex, box->numOfVertices);
-  this->separationPlane = new Plane(box->axis[axisIndex], box->vertices[vertexIndex]);  //!< separation plane
+  this->separationPlane = Plane(box->axis[axisIndex], box->vertices[vertexIndex]);  //!< separation plane
   this->sepPlaneCenter = &box->vertices[vertexIndex];
   this->longestAxisIndex = axisIndex;
@@ -627,5 +638,5 @@
   {
     if( i == vertexIndex) continue;
-    tmpDist = this->separationPlane->distancePoint(box->vertices[i]);
+    tmpDist = this->separationPlane.distancePoint(box->vertices[i]);
     if( tmpDist > 0.0)
       partition1.add(&box->vertices[i]); /* positive numbers plus zero */
@@ -660,5 +671,5 @@
     element = iterator->nextElement();
   }
-
+  delete iterator;
 //   PRINTF(0)("\npartition 1:\n");
 //   for(int i = 0; i < partition1.getSize(); ++i)
@@ -679,5 +690,9 @@
   }
 
+  if (this->tmpVert1 != NULL)
+    delete[] this->tmpVert1;
   this->tmpVert1 = vertList1;
+  if (this->tmpVert2 != NULL)
+    delete[] this->tmpVert2;
   this->tmpVert2 = vertList2;
   this->tmpLen1 = partition1.getSize();
Index: /branches/collision_detection/src/lib/collision_detection/obb_tree_node.h
===================================================================
--- /branches/collision_detection/src/lib/collision_detection/obb_tree_node.h	(revision 5698)
+++ /branches/collision_detection/src/lib/collision_detection/obb_tree_node.h	(revision 5699)
@@ -66,5 +66,5 @@
     int                 depth;                      //!< the depth of the node in the tree
     static OBBTree*     obbTree;                    //!< reference to the obb tree
-    Plane*              separationPlane;            //!< the separation plane of the obb
+    Plane               separationPlane;            //!< the separation plane of the obb
     const sVec3D*       sepPlaneCenter;             //!< only needed to draw plane
     int                 longestAxisIndex;           //!< only needed to draw plane
