I think we're making this much more difficult then it has to be. The proper way to exit a C++ program is to push the power button on the front of the machine. This way, all the memory gets cleaned out ...