Re: About Memory Leaks


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

Posted by Daniel Longest on April 18, 2001 at 00:03:43:

In Reply to: Re: About Memory Leaks posted by Aaron Faust on April 17, 2001 at 18:58:44:

remove will not call delete on the object, you will have a memory leak. It will only destroy that value internal to the list.

Daniel

: I assume that you are using the STL list. Why not just call list.remove(Creature* X). This way, the list takes care of searching and deleting for you - all dynamic memory is deallocated via the list implementation.




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 ]