fougue/mayo

After removing the node in "libtree.h", only the node is marked as true, and the node content "data" is not completely removed.

Opened this issue · 0 comments

`template void Tree::removeRoot(TreeNodeId id)
{
Expects(this->nodeIsRoot(id));

// TODO Mark all deep children nodes as 'deleted'
auto it = std::find(m_vecRoot.begin(), m_vecRoot.end(), id);
if (it != m_vecRoot.end()) {
    TreeNode* node = this->ptrNode(id);
    Expects(node != nullptr);
    node->isDeleted = true;
    m_vecRoot.erase(it);
}

}` In this part, if the model is opened repeatedly and then removed, the node content is not completely deleted, which will cause the memory to continue to increase.