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 » U++ community news and announcements » Clean Exit
Clean Exit [message #36343] Mon, 21 May 2012 14:48 Go to next message
mirek is currently offline  mirek
Messages: 13428
Registered: November 2005
Ultimate Member
New function

void Exit(int code = 1);

(Core/App.h)

is equivalent of C exit function, but implemented using exception (and catch in _APP_MAIN). This has an advantage of destructors being correctly called -> no leaks.

In related news, _APP_MAIN now catches Exc derivated exceptions and shows them using Panic.

For Rainbow implementation, GUI_APP_MAIN should now use AppExecute__(GuiMain_); to provide these features (instead of calling GuiMain_() directly).
Re: Clean Exit [message #36443 is a reply to message #36343] Sun, 27 May 2012 21:54 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

Good news.
Exc is becoming even more useful.
Re: Clean Exit [message #36525 is a reply to message #36343] Tue, 05 June 2012 02:31 Go to previous messageGo to next message
nlneilson is currently offline  nlneilson
Messages: 644
Registered: January 2010
Location: U.S. California. Mojave &...
Contributor
I had a problem closing apps that left threads still running.
The problem and how I solved it is in this thread:
http://www.ultimatepp.org/forum/index.php?t=msg&goto=301 20&&srch=exit#msg_30120

Does the New function

void Exit(int code = 1);

do anything to close the threads or do they still need to be closed in a similar manner as in the link?

[Updated on: Tue, 05 June 2012 02:34]

Report message to a moderator

Re: Clean Exit [message #36527 is a reply to message #36525] Tue, 05 June 2012 08:16 Go to previous message
mirek is currently offline  mirek
Messages: 13428
Registered: November 2005
Ultimate Member
nlneilson wrote on Mon, 04 June 2012 20:31

I had a problem closing apps that left threads still running.
The problem and how I solved it is in this thread:
http://www.ultimatepp.org/forum/index.php?t=msg&goto=301 20&&srch=exit#msg_30120

Does the New function

void Exit(int code = 1);

do anything to close the threads or do they still need to be closed in a similar manner as in the link?


At this moment, it can only be invoked from the main thread and only terminates the main thread...

I would like this to work universally, but interrupting threads still seems to be tough issue...

[Updated on: Tue, 05 June 2012 08:17]

Report message to a moderator

Previous Topic: LOGHEX, DUMPHEX, (and D/R/L variants)
Next Topic: SqlLoadTable, SqlLoadColumn
Goto Forum:
  


Current Time: Mon Sep 27 00:50:44 CEST 2021

Total time taken to generate the page: 0.01406 seconds