Originally Posted by
Adak
No, it's not necessary. The OS gives the program a block of memory. Think of it as one large chunk. When the program terminates, ALL that large chunk of memory, is available (free'd), to the OS, for use by any other program.
Memory leaks are really a problem when the program leaking memory, runs for a long(er) time. Eventually, the chunk of memory available to the program runs low, causing the system to run very slowly as it starts using available swap space on the hard drive, as RAM (very slow). Finally, the program will crash.