diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-02-27 10:55:37 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-02-27 10:55:37 +0100 |
commit | 1b01642dda7ae8bbf3e74a979ffcf7941a8ae2b9 (patch) | |
tree | 8245eb2a18183181ee766384c3a4e43cec559e34 /gui | |
parent | 99ab4eb8e64bdc7abe0a8751ada04342f21884f2 (diff) |
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.
Diffstat (limited to 'gui')
-rw-r--r-- | gui/main.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
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 <QCoreApplication> # include <QFile> # include <QString> +#else +# include <unistd.h> #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; |