LCRS DestroyTree 함수
2010-10-07
|
by aplusst
2181
void LCRS_DestroyTree(LCRSNode *Root)
{
if(Root->RightSibling != NULL)
{
LCRS_DestroyTree(Root->RightSibling);
Root->rightSibling = NULL;
}
if(Root->LeftChild != NULL)
{
LCRS_DestroyTree(Root->LeftChild);
Root->LeftChild = NULL;
}
LCRS_DestroyNode(Root);
}
이렇게 해도 무방한가요?