Re: Help!!


[ Follow Ups ] [ Post Followup ] [ CS328 Message Board ] [ FAQ ]

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:
delete ;
and also make sure you are not blasting any pointers without deleting memory first. e.g.

TREENODE *temp = root->rc;
root = temp;

you just lost what root was originally pointing to.

change to this:

TREENODE *temp = root->rc
TREENODE *stor = root
root = temp;
delete stor;


hope that helps.

aaron


Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ CS328 Message Board ] [ FAQ ]