Reputation: 7371
I have a C++ application that needs to be closed when it receives a shutdown command. When this command is received it should terminate all the threads, clean up everything and gracefully exit.
The problem is that my application is not shutting down, it just remains opened when the command is received.
I believe that the problem is that I am not finalizing all the threads and handles when the shutdown command is received, however since my application is quite large one, I am having problems locating which is the thread or handle that is holding it up.
Is there a way to discover which is the thread or handle that is not getting finished?
PS: I am using Visual Studio 2005 in Windows XP SP3.
Upvotes: 0
Views: 191
Reputation: 7371
I've ran my application in debug and user the Threads window to see who wasn't being closed. I've updated my code and everything works fine now.
Thank you for all the answers.
Upvotes: 1