Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Shutdown procedure by clicking red x
Shutdown procedure by clicking red x [message #30002] Thu, 02 December 2010 15:17 Go to previous message
nlneilson is currently offline  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

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Copy\Paste Between Project Files Doesn't work
Next Topic: Error meaning
Goto Forum:
  


Current Time: Wed May 08 09:37:01 CEST 2024

Total time taken to generate the page: 0.02719 seconds