Hi:
I have doubt by the two articles.
One said the system won't reclaim the memory resource when the program exit . One said it would do . so which one is right?
or they are both right because they are talking about differnt OS platform?

Article One:
http://www.howstuffworks.com/question466.htm
When any program begins running, it uses up some space in the "system resources" area in memory. But, as you exit, some programs do not give back system resources they were temporarily using. Eventually the system will crash as it runs out of memory. The crash happens sometimes if you start and close many programs, even the same ones, without a periodic reboot. This is what Microsoft calls a resource leak or memory leak.

Article Two:
www.hpl.hp.com/personal/Hans_Boehm/gc/myths.ps
Allocation Myth 4:Non-garbage-collected programs should always deallocate all memory they allocate. The Truth:Omitted deallocations in frequently executed code cause growing leaks. They are rarely acceptable. but Programs that retain most allocated memory until program exit often perform better without any intervening deallocation. Malloc is much easier to implement if there is no free.

In most cases, deallocating memory just before program exit is pointless. The OS will reclaim it anyway. Free will touch and page in the dead objects; the OS won't.

Consequence: Be careful with "leak detectors" that count allocations. Some "leaks" are good!

Best Regards