예제 #1
0
파일: t3.c 프로젝트: execb5/Random-Codes
void destroyAux(struct Node* node)
{
        if (node == NULL)
                return;
        destroyAux(node->next);
        //printf("Freeing node with the value of %d\n", node->val);
        free(node);
}
예제 #2
0
파일: main.cpp 프로젝트: chrzhang/abc
 ~Tree() {
     destroyAux(root);
 }
예제 #3
0
파일: main.cpp 프로젝트: chrzhang/abc
 void destroyAux(TreeNode * parent) {
     if (!parent) { return; }
     destroyAux(parent->left);
     destroyAux(parent->right);
     delete parent;
 }
예제 #4
0
파일: main.cpp 프로젝트: chrzhang/abc
 void destroyAux(TreeNode * n) {
     if (!n) { return; }
     destroyAux(n->left);
     destroyAux(n->right);
     delete n;
 }
예제 #5
0
파일: t3.c 프로젝트: execb5/Random-Codes
void destroy(List* list)
{
        destroyAux(list->head);
}