mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 21:25:58 +01:00
refactor: manually resets singletons (#3395)
This commit is contained in:
parent
1357b66091
commit
ea5d9584da
3 changed files with 21 additions and 0 deletions
|
@ -74,6 +74,24 @@ CCompositor::CCompositor() {
|
||||||
|
|
||||||
CCompositor::~CCompositor() {
|
CCompositor::~CCompositor() {
|
||||||
cleanup();
|
cleanup();
|
||||||
|
g_pPluginSystem.reset();
|
||||||
|
g_pHyprNotificationOverlay.reset();
|
||||||
|
g_pDebugOverlay.reset();
|
||||||
|
g_pEventManager.reset();
|
||||||
|
g_pSessionLockManager.reset();
|
||||||
|
g_pProtocolManager.reset();
|
||||||
|
g_pXWaylandManager.reset();
|
||||||
|
g_pHyprRenderer.reset();
|
||||||
|
g_pHyprOpenGL.reset();
|
||||||
|
g_pInputManager.reset();
|
||||||
|
g_pThreadManager.reset();
|
||||||
|
g_pConfigManager.reset();
|
||||||
|
g_pLayoutManager.reset();
|
||||||
|
g_pHyprError.reset();
|
||||||
|
g_pConfigManager.reset();
|
||||||
|
g_pAnimationManager.reset();
|
||||||
|
g_pKeybindManager.reset();
|
||||||
|
g_pHookSystem.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCompositor::setRandomSplash() {
|
void CCompositor::setRandomSplash() {
|
||||||
|
|
|
@ -51,6 +51,8 @@ CAnimatedVariable::~CAnimatedVariable() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CAnimatedVariable::unregister() {
|
void CAnimatedVariable::unregister() {
|
||||||
|
if (!g_pAnimationManager)
|
||||||
|
return;
|
||||||
std::erase_if(g_pAnimationManager->m_vAnimatedVariables, [&](const auto& other) { return other == this; });
|
std::erase_if(g_pAnimationManager->m_vAnimatedVariables, [&](const auto& other) { return other == this; });
|
||||||
m_bIsRegistered = false;
|
m_bIsRegistered = false;
|
||||||
disconnectFromActive();
|
disconnectFromActive();
|
||||||
|
|
|
@ -106,6 +106,7 @@ int main(int argc, char** argv) {
|
||||||
|
|
||||||
// If we are here it means we got yote.
|
// If we are here it means we got yote.
|
||||||
Debug::log(LOG, "Hyprland reached the end.");
|
Debug::log(LOG, "Hyprland reached the end.");
|
||||||
|
g_pCompositor.reset();
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue