u01: Add messages to destructor
This commit is contained in:
parent
48cfafc9a3
commit
51a326b66c
|
@ -3,9 +3,11 @@
|
|||
#include "node.h"
|
||||
|
||||
node::~node() {
|
||||
std::cout << "enter ~node() of \"" << get_name() << "\"" << std::endl;
|
||||
for (node *child : children) {
|
||||
delete child;
|
||||
}
|
||||
std::cout << "leave ~node() of \"" << get_name() << "\"" << std::endl;
|
||||
}
|
||||
|
||||
std::string node::get_name() const { return name; }
|
||||
|
|
Reference in a new issue