Addition seems to be working

This commit is contained in:
Romain Goyet
2018-06-12 17:39:10 +02:00
parent 68f663d47e
commit a301de1378
8 changed files with 37 additions and 130 deletions

View File

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