Recursive Implementations 2
static void RRelease(Node* n)
// post: all descendants of n have been deleted
{
if (n != 0)
{
if (n->lchild_ != 0)
{
RRelease(n->lchild_);
delete n->lchild_;
n->lchild_ = 0;
}
if (n->rchild_ != 0)
{
RRelease(n->rchild_);
delete n->rchild_;
n->rchild_ = 0;
}
}
}