mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 03:35:09 +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
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…
Add table
Add a link
Reference in a new issue