mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:27:35 +00:00
LibGUI: Add GUI::Application::in_teardown()
This will return true after ~GUI::Application() has been entered.
This commit is contained in:
parent
d1a5254e41
commit
24ea6a8ce7
2 changed files with 10 additions and 0 deletions
|
@ -101,8 +101,16 @@ Application::Application(int argc, char** argv, Core::EventLoop::MakeInspectable
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool s_in_teardown;
|
||||||
|
|
||||||
|
bool Application::in_teardown()
|
||||||
|
{
|
||||||
|
return s_in_teardown;
|
||||||
|
}
|
||||||
|
|
||||||
Application::~Application()
|
Application::~Application()
|
||||||
{
|
{
|
||||||
|
s_in_teardown = true;
|
||||||
revoke_weak_ptrs();
|
revoke_weak_ptrs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,8 @@ public:
|
||||||
|
|
||||||
~Application();
|
~Application();
|
||||||
|
|
||||||
|
static bool in_teardown();
|
||||||
|
|
||||||
int exec();
|
int exec();
|
||||||
void quit(int = 0);
|
void quit(int = 0);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue