Re: Deletion Question...


[ Follow Ups ] [ Post Followup ] [ CS2704 Web Discussion Board ] [ FAQ ]

Posted by Daniel Longest on April 21, 2001 at 14:33:11:

In Reply to: Deletion Question... posted by David Shell on April 21, 2001 at 13:23:21:

If you are storing pointers in the list allocated with new, you will need to delete those but the list will take care of its internal destruction when its destructor is invoked.

Daniel

: When we need to delete our lists, say in the destructor, I assume it is correct to go through each list, retrieve and remove the pointer to each Creature, and delete the dynamic memory pointed to... Is this correct? Do I also need to in some way delete the stl list itself, or when it goes out of scope, does it handle its own deletion?




Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ CS2704 Web Discussion Board ] [ FAQ ]