mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
LibGUI: Add GUI::Application::in_teardown()
This will return true after ~GUI::Application() has been entered.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user