freed tree nodes in nsAVLTree

git-svn-id: svn://10.0.0.236/trunk@48373 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
warren%netscape.com
1999-09-20 20:54:12 +00:00
parent 4a5f6f43ca
commit 8a533d4ca4
3 changed files with 27 additions and 0 deletions

View File

@@ -59,6 +59,14 @@ nsAVLTree::nsAVLTree(nsAVLNodeComparitor& aComparitor,
}
static void
avlDeleteTree(nsAVLNode* aNode){
if (aNode) {
avlDeleteTree(aNode->mLeft);
avlDeleteTree(aNode->mRight);
delete aNode;
}
}
/**
*
@@ -70,6 +78,7 @@ nsAVLTree::~nsAVLTree(){
if (mDeallocator) {
ForEachDepthFirst(*mDeallocator);
}
avlDeleteTree(mRoot);
}