Use operator new/delete directly on ExpressionNode

This commit is contained in:
Romain Goyet
2018-06-12 16:50:49 +02:00
parent 3cd1015614
commit 68f663d47e
12 changed files with 234 additions and 164 deletions

16
tree_node.cpp Normal file
View File

@@ -0,0 +1,16 @@
#include "tree_node.h"
#include "expression_node.h"
void TreeNode::release() {
m_referenceCounter--;
for (TreeNode * child : directChildren()) {
child->release();
}
if (m_referenceCounter == 0) {
printf("DELETE %d(%p)\n", m_identifier, this);
delete this;
//dealloc();
printf("Will log\n");
ExpressionNode::Pool()->log();
}
}