Re: [Dev-C++] singleton pattern implementation.
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Chris M. <lor...@gm...> - 2007-09-28 03:43:03
|
On 9/27/07, Per Westermark <pw...@ia...> wrote: > Only embedded-system operating systems should/may be unable to reclaim all > memory after a program/task has ended. > > However, there are other issues with not calling an object destructor. The > object may contain other resources that are not reclaimable by the OS. For > example, the object may use temporary files that should be removed by the > destructor. Or the object could control aspects of some hardware. I've always been told to never trust anything to clean up your memory for you. It'll probably leave me to clean up a lot of memory when I don't need to, but learning how to deal with memory, with particular regards to scope and when things come in and out of scope, will never hurt IMHO. -- Registered Linux Addict #431495 If You Know What's Good For You, You'll Install Linux John 3:16! |