1
Fork 0
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:
Andreas Kling 2021-11-03 19:53:33 +01:00
parent d1a5254e41
commit 24ea6a8ce7
2 changed files with 10 additions and 0 deletions

View file

@ -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();
}