1
Fork 0
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:
Andreas Kling 2019-03-05 12:48:59 +01:00
parent 9e1fcb74a2
commit 086a0fc969

View file

@ -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)