views:

32

answers:

1

I used the answer from this thread: http://stackoverflow.com/questions/474679/capture-console-exit-c

Whenever I close the console, I get a "--- has stopped working." from Windows 7. Any idea?

+1  A: 

1) IMHO, that answer's approach isn't necessarily a good idea - if you know of things you need to clean up that process exit doesn't already clean up for you (for instance, it'll already do connections, file handles, memory, threads, etc), then hooking to the appdomain unload or process exit or similar kind of event is a better idea IMHO

2) how did you implement Handler? as per the comments in that question, if you had it return true, that explains what you're seeing.

James Manning