mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-23 15:50:49 +01:00
NodeForIdentifier array works properly
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
#include "tree_node.h"
|
||||
#include "tree_pool.h"
|
||||
#include "expression_node.h"
|
||||
|
||||
TreePool * TreeNode::Pool() {
|
||||
static TreePool pool;
|
||||
return &pool;
|
||||
}
|
||||
|
||||
void TreeNode::release() {
|
||||
printf("Releasing of %d(%p)\n", m_identifier, this);
|
||||
m_referenceCounter--;
|
||||
@@ -19,8 +25,9 @@ void TreeNode::release() {
|
||||
}
|
||||
} while (child->identifier() != lastIdentifier);
|
||||
}
|
||||
|
||||
printf("DELETE %d(%p)\n", m_identifier, this);
|
||||
int identifier = m_identifier;
|
||||
delete this;
|
||||
Pool()->freeIdentifier(identifier);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user