From c6193af26957b0fafdc67af5523c73a796613f6d Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 1 Jul 2020 20:49:00 +0200 Subject: [PATCH] LibGUI: Make Application::exec() return instead of calling exit() We were calling exit() here because we didn't want to deal with object teardown in the long-long-ago before Core::Object was ref-counted. --- Libraries/LibGUI/Application.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Libraries/LibGUI/Application.cpp b/Libraries/LibGUI/Application.cpp index fd3a15bd19..8f4631adb4 100644 --- a/Libraries/LibGUI/Application.cpp +++ b/Libraries/LibGUI/Application.cpp @@ -75,11 +75,7 @@ Application::~Application() int Application::exec() { - int exit_code = m_event_loop->exec(); - // NOTE: Maybe it would be cool to return instead of exit()? - // This would require cleaning up all the Core::Objects on the heap. - exit(exit_code); - return exit_code; + return m_event_loop->exec(); } void Application::quit(int exit_code)