is there a difference in the dispose() functions being called ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.