Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 7, 2005, 3:27:46 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: the vertices data and the obb trees now get deleted, in the resume at the end (Class_list) there are still a number of references, will track this down now

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc

    r4813 r4814  
    5050  this->nodeLeft = NULL;
    5151  this->nodeRight = NULL;
     52  this->bvElement = NULL;
    5253
    5354  if(coMat == NULL)
     
    7980OBBTreeNode::~OBBTreeNode ()
    8081{
    81 
    82   delete [] this->vertices;
    83 
    84   delete this->bvElement;
    85   delete this->nodeLeft;
    86   delete this->nodeRight;
     82  if( this->nodeLeft)
     83  {
     84    delete this->nodeLeft;
     85    this->nodeLeft = NULL;
     86  }
     87  if( this->nodeRight)
     88  {
     89    delete this->nodeRight;
     90    this->nodeRight = NULL;
     91  }
     92  printf("deleting nr %i obbTreeNode\n", this->getIndex());
     93  if( this->bvElement)
     94    delete this->bvElement;
     95  this->bvElement = NULL;
    8796}
    8897
     
    113122  PRINTF(3)("Calculated attributes3\n");
    114123
     124  /* if this is the first node, the vertices data are the original ones of the model itself, so dont delete them in cleanup */
     125  if( this->treeIndex == 1)
     126    this->bvElement->bOrigVertices = true;
    115127
    116128  if( likely( this->depth > 0))
Note: See TracChangeset for help on using the changeset viewer.