Ver Fonte

tree_node.cpp: replace delete with aligned_delete

Dhairya Malhotra há 10 anos atrás
pai
commit
fb5c44b61b
1 ficheiros alterados com 3 adições e 3 exclusões
  1. 3 3
      src/tree_node.cpp

+ 3 - 3
src/tree_node.cpp

@@ -97,9 +97,9 @@ void TreeNode::Truncate() {
   int n=(1UL<<dim);
   for(int i=0;i<n;i++){
     if(child[i]!=NULL)
-      delete child[i];
+      mem::aligned_delete(child[i]);
   }
-  delete[] child;
+  mem::aligned_delete(child);
   child=NULL;
 }
 
@@ -117,7 +117,7 @@ void TreeNode::SetChild(TreeNode* c, int id) {
   assert(id<(1<<dim));
   //assert(child!=NULL);
   //if(child[id]!=NULL)
-  //  delete child[id];
+  //  mem::aligned_delete(child[id]);
   child[id]=c;
   if(c!=NULL) child[id]->SetParent(this,id);
 }