QUOTE(Tom9729 @ 6 Aug, 2008 - 06:47 PM)

Once the program ceases termination doesn't the memory go back to the system anyway? Or is that dependent upon the implementation?
That is correct. In both senses. Because the operating system has to keep track of everything, it is inherently implementation dependent. However, I don't know of any modern implementations that do not do this.
I think the idea between always freeing what you malloc is that you don't know when someone may reuse your code for something where it usually matters (an interactive application that runs for more than a few seconds, for example).
The same thing with file handles is also true. Actually, this can be mostly applied to all OS resources.
Where you'll really get screwed on this though is with Windows GDI handles. All kinds of funny things happen when the program creates enough handles to prevent other applications from creating them (and they tend to leak quickly... as quickly as your leaky callbacks are called).