mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
LibGUI: Let GApplication::exec() call exit() instead of returning to main().
This sidesteps the problem of having various things on the heap that don't get torn down. It's obviously not a great solution, but it'll work for now.
This commit is contained in:
parent
9e1fcb74a2
commit
086a0fc969
Notes:
sideshowbarker
2024-07-19 15:33:02 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/086a0fc969f
1 changed files with 6 additions and 1 deletions
|
@ -22,11 +22,16 @@ GApplication::GApplication(int argc, char** argv)
|
|||
|
||||
GApplication::~GApplication()
|
||||
{
|
||||
s_the = nullptr;
|
||||
}
|
||||
|
||||
int GApplication::exec()
|
||||
{
|
||||
return m_event_loop->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 GObjects on the heap.
|
||||
exit(exit_code);
|
||||
return exit_code;
|
||||
}
|
||||
|
||||
void GApplication::quit(int exit_code)
|
||||
|
|
Loading…
Reference in a new issue