Posted by Aaron on July 12, 2001 at 02:34:20:
In Reply to: Help!! posted by Natalie on July 12, 2001 at 01:11:55:
: largeloss 52014 -0.114079
you may wanna take a closer look at this value as well... this basically says that you are losing 52014 foo's, or in other words are leaking pretty much every foo you put in the tree :).
largeloss 0 2.44949
This is what the value read from mine, indicating that i had properly deleted all the foos from the tree. In your remove, make sure you are explicitly calling: TREENODE *temp = root->rc; you just lost what root was originally pointing to. change to this: TREENODE *temp = root->rc aaron
delete
and also make sure you are not blasting any pointers without deleting memory first. e.g.
root = temp;
TREENODE *stor = root
root = temp;
delete stor;
hope that helps.