Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle destructors correctly #2

Closed
dniklaus opened this issue Mar 30, 2016 · 0 comments · Fixed by #3
Closed

Handle destructors correctly #2

dniklaus opened this issue Mar 30, 2016 · 0 comments · Fixed by #3
Assignees

Comments

@dniklaus
Copy link
Owner

dniklaus commented Mar 30, 2016

On deleting a topic, the nodes of the sub-structure shall be deleted as well.
Any node being deleted shall detach itself from the parent properly.

Add an implementation for the destructor DbgCli_Topic::~DbgCli_Topic():

  • call delete on all children
  • create and implement DbgCli_Topic::delChildNode(DbgCli_Node* node)
  • implement also the DbgCli_Node::~DbgCli_Node() destructor:
    • call parentTopic->delChildNode(this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant