deallocating cars and tow trucks...


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

Posted by Yoon-Soo on December 03, 2001 at 03:31:43:

In my case, the controller is responsible for creating cars and tow trucks...
Later on when I started to worry about memory leak, this question came up to my mind...

What is responsible for deallocating the cars and tow trucks(when the probram ends)...

Should the controller class hande it, since they are created in the controller class?

Or should the Street class and the Dispatcher class handle it, since the dynamically allocated pointers are part of the street object or the dispatcher object's tow truck list?

Am I not getting what association and dynamic allocatino is all about??? Very worried...please help me!!!


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 ]