diff options
author | saturneric <[email protected]> | 2023-12-16 05:12:25 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2023-12-16 05:12:25 +0000 |
commit | c41074792f8c3b966b6d637c9e9b0ee10c5255e7 (patch) | |
tree | a20f44b3f275f69d0185a0dcf926082721db3220 /src/main.cpp | |
parent | fix: slove threading and memory issues (diff) | |
download | GpgFrontend-c41074792f8c3b966b6d637c9e9b0ee10c5255e7.tar.gz GpgFrontend-c41074792f8c3b966b6d637c9e9b0ee10c5255e7.zip |
fix: clean up envirnoment when app exits
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index a8de6993..3bffe608 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -62,6 +62,7 @@ auto main(int argc, char* argv[]) -> int { GpgFrontend::GFCxtSPtr ctx = GpgFrontend::SecureCreateSharedObject<GpgFrontend::GpgFrontendContext>( argc, argv); + auto rtn = 0; // initialize qt resources Q_INIT_RESOURCE(gpgfrontend); @@ -102,9 +103,14 @@ auto main(int argc, char* argv[]) -> int { ctx->load_default_gpg_context = false; InitGlobalBasicalEnv(ctx, false); - return RunTest(ctx); + rtn = RunTest(ctx); + ShutdownGlobalBasicalEnv(ctx); + return rtn; } InitGlobalBasicalEnv(ctx, true); - return StartApplication(ctx); + rtn = StartApplication(ctx); + ShutdownGlobalBasicalEnv(ctx); + + return rtn; } |