mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +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()
|
||||
{
|
||||
s_in_teardown = true;
|
||||
revoke_weak_ptrs();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue