summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-07-01 20:49:00 +0200
committerAndreas Kling <kling@serenityos.org>2020-07-01 20:49:00 +0200
commitc6193af26957b0fafdc67af5523c73a796613f6d (patch)
tree6f615ded796451a9ef5b4291c9a8c5bedf4217d1
parent8661af9b723fa4ee968aaff5f81cce65aeac832b (diff)
downloadserenity-c6193af26957b0fafdc67af5523c73a796613f6d.zip
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.
-rw-r--r--Libraries/LibGUI/Application.cpp6
1 files changed, 1 insertions, 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)