Home » Community » Newbie corner » Shutdown procedure by clicking red x
Shutdown procedure by clicking red x [message #30002] |
Thu, 02 December 2010 15:17  |
nlneilson
Messages: 644 Registered: January 2010 Location: U.S. California. Mojave &...
|
Contributor |
|
|
I have an app created with Upp that works great most of the time.
I am wondering about the shutdown procedure when clicking on the red x to end the app. The code has:
void Exit0() {
if(CommPort.IsOpened()) CommPort.Close();
if(CommPort2.IsOpened()) CommPort2.Close();
Thread::ShutdownThreads();
Break(); // Closes window with 'Cancel'
}
GUI_APP_MAIN{
GPSv2().Run();
if(CommPort.IsOpened()) CommPort.Close();
if(CommPort2.IsOpened()) CommPort2.Close();
Thread::ShutdownThreads();
}
When the app is closed with "void Exit0()" it explicitly closes any open ports and shuts down any threads.
When clicking the red x to end the app will this close the ports and end the threads if that is under _MAIN?
[Updated on: Thu, 02 December 2010 15:21] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sun Apr 27 22:14:46 CEST 2025
Total time taken to generate the page: 0.02103 seconds
|