SFU ID: tbonas
Github username: trevorbonas
Line and file: Line 94 tree.c
Expected behavior: Frees tree created by build_tree_string
Observed behavior: Frees tree created by build_tree_string
Question:
At the bottom of the description for assignment 1 it says we must make sure our programs don't have any leaks, so I created a tree freeing function, de_tree, and used it in build_tree_string, the only place in the tests that a tree is built.
Valgrind says it works fine, and all changes are in the remote repo, I was just wondering if the change I made was appropriate: build_tree_string calls print_postorder_string, which takes a Node* as input, given by passing a call to my written function build_tree. To properly free the tree I called build_tree before print_postorder_string, stored the result in a Node* and passed that Node* into print_postorder_string. Is this change okay?