From 51a326b66c64451b2d2a9a1cf7e5f1cd37965d57 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Fri, 21 Apr 2023 22:46:37 +0200 Subject: [PATCH] u01: Add messages to destructor --- u01/node.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/u01/node.cpp b/u01/node.cpp index a8f52b2..9719011 100644 --- a/u01/node.cpp +++ b/u01/node.cpp @@ -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; }