I experienced some weird behavior with Visual Studio's Debugger when running VS with the Dedicated GPU.
What is weird is that when I terminate the program I am building, the debugger stays on. I don't see this when running VS with the integrated graphics. Also - I checked if there were threads or COM-objects still alive and there is an active thread, but no COM references.
I think it's weird. Have any of you experienced anything like it? Am I missing something obvious? Are there settings to be changed or special rules when running VS with the Dedicated GPU?
It doesn't really hurt anything - but it makes my OCD explode. ;)
Thank you all in advance for your constructive input :D
Most Sincerely Alpha Silverback
I have been surfing around a long time to find an answer. The difference between running the application with different Graphics Accelerators is only that the thread doesn't die after WinMain has returned when app is running using dedicated GPU.
To fix this - I found through experimenting that explicitly calling destructors of any live object and then calling std::exit( return code ) right before WinMain's return call will kill all threads correctly. It is still weird that the different hardware produces different behavior, though. This solution works for both.
**Example**:
WinMain(...){
.
.
.
object.~Class();
std::exit( return-code );
//return return-code;
}
I don't like this answer, because it should not be necessary.
Please make sure You add solutions if You have found another way. Thank you in advance.
Most Sincerely, Alpha Silverback