X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=nucleus%2Flibrary%2Fnodes%2Ftree.cpp;fp=nucleus%2Flibrary%2Fnodes%2Ftree.cpp;h=ae09f049f5446d79e86f75a5c63ab7f5e697f7ea;hb=489eefa5c0460406dee8b369e3b7bfca142bd0e5;hp=2a88061cada797e432fc2108d0c4874395db22e7;hpb=deea05747036fb543536f8c0b4946e6c5c7cffea;p=feisty_meow.git diff --git a/nucleus/library/nodes/tree.cpp b/nucleus/library/nodes/tree.cpp index 2a88061c..ae09f049 100644 --- a/nucleus/library/nodes/tree.cpp +++ b/nucleus/library/nodes/tree.cpp @@ -18,7 +18,7 @@ #include #include -//#define DEBUG_TREE +#define DEBUG_TREE // uncomment if you want lots of debugging info. #undef LOG @@ -274,6 +274,7 @@ tree::tree() tree::~tree() { + FUNCDEF("destructor"); // must at least unhook ourselves from the parent so we don't become a lost // cousin. tree *my_parent = parent(); @@ -306,8 +307,11 @@ tree::~tree() // or there are no kids at all. curr_node = curr_node->branch(0); +LOG(a_sprintf("loop traverse on %p", curr_node)); + if (curr_node == NULL_POINTER) { // wayback has no children, so we can take action. +LOG(a_sprintf("inside null condition, loop traverse on %p", curr_node)); // if wayback is the same as "this", then we exit from iterations since // we've cleaned all the kids out.