emblewembl
Programmer
My C# Windows app has to connect to a computer when requested by a user, and therefore it is important that I ensure this connection is 'cleaned up' whenever the application closes, whether it is manually closed or crashes etc.
All of this is fine apart from when I am running the application from Visual Studio.Net 2003 in debug mode and I press shift + F5 to stop debugging. The Application Dispose method does not get called in this scenario and I have tried catching Application.ThreadExit, Application.Exit etc but can't seem to find any event that is fired in this case.
It is important that I can catch some event because connections are being left open and I eventually run out which is a real pain!! Any ideas?
i love chocolate
All of this is fine apart from when I am running the application from Visual Studio.Net 2003 in debug mode and I press shift + F5 to stop debugging. The Application Dispose method does not get called in this scenario and I have tried catching Application.ThreadExit, Application.Exit etc but can't seem to find any event that is fired in this case.
It is important that I can catch some event because connections are being left open and I eventually run out which is a real pain!! Any ideas?
i love chocolate