CS202   7- ‹#›
Tree Implementation File
nstatic void destroy(tree::node* node_ptr) {
n  if(node_ptr) {
n    destroy(node_ptr->left);
n    destroy(node_ptr->right);
n    delete node_ptr;
n  }
n}
ntree::~tree() {                 //destructor
n  destroy(root);
n}
n
•Since these utility functions are recursive in nature, each invocation relies on its arguments to determine both the results of the operation and the depth of recursion. Therefore, they are prime candidates for being considered as non-member static functions.