is there a difference in the dispose() functions being called ?
views:
276answers:
1
+3
A:
I'll guess that you're asking about closing the debuggee via the X button in the top right, versus stopping debugging via the Stop Debugging command (Shift+F5) from Visual Studio.
When you close the app with the X button, any cleanup code you've written for the application will run as normal, including Dispose functions(). On the other hand, stopping with Shift+F5 terminates the process immediately, as though you had terminated it from the Processes tab in Task Manager. This means that no cleanup code will run - the application will have no idea that it is shutting down.
Charlie
2008-10-16 13:50:05