/** * * Function used to delete a tree. Do not call directly. * */ static void deleteTreeRecursive(Node *x/*, int *sizeDb*/){ if (x->right != NIL) deleteTreeRecursive(x->right/*, sizeDb*/); if (x->left != NIL) deleteTreeRecursive(x->left/*, sizeDb*/); freeRBData(x->data/*, sizeDb*/); free(x); }
/** * * Function used to delete a tree. Do not call directly. * */ static void deleteTreeRecursive(Node *x, int *sizeDb) { if (x->right != NIL) deleteTreeRecursive(x->right, sizeDb); if (x->left != NIL) deleteTreeRecursive(x->left, sizeDb); freeRBData(x->data, sizeDb); free(x); }
static void deleteTreeRecursive(Node *x) { if (x->right != NIL) deleteTreeRecursive(x->right); if (x->left != NIL) deleteTreeRecursive(x->left); freeRBData(x->data); free(x); }