mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-24 00:00:44 +01:00
17 lines
361 B
C++
17 lines
361 B
C++
#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();
|
|
}
|
|
}
|