From 1b01642dda7ae8bbf3e74a979ffcf7941a8ae2b9 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 27 Feb 2017 10:55:37 +0100 Subject: options/fix bundle refcount handling We rolled up our own refcount while using shared_ptr at the same time. Remove all rolled-up logic and rely on shared_ptr's custom deleter to do the cleanups. This greatly simplifies the code here. Unfortunately, _fini ordering makes Qt crash after the app object runs out of scope: gui/main.cpp: QApplication app(argc, argv); Both things considered, use _exit(2) on Unix to avoid running static destructors. --- gui/main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gui/main.cpp') diff --git a/gui/main.cpp b/gui/main.cpp index 1972e7a3..d9aba3ce 100644 --- a/gui/main.cpp +++ b/gui/main.cpp @@ -5,6 +5,8 @@ # include # include # include +#else +# include #endif #include "migration/migration.hpp" @@ -175,8 +177,10 @@ main(int argc, char** argv) #if defined(_MSC_VER) qDebug() << "exit: terminating"; TerminateProcess(GetCurrentProcess(), 0); +#else + // we have some atexit issues when not leaking bundles + //_exit(0); #endif - qDebug() << "exit: main()"; return 0; -- cgit v1.2.3