From c093e284d9ac9759e082d1590e2d91b49ae627fe Mon Sep 17 00:00:00 2001 From: scrawl Date: Sat, 31 Jan 2015 16:26:15 +0100 Subject: [PATCH] Delegate cleanup --- apps/openmw/mwgui/hud.cpp | 4 ++++ apps/openmw/mwgui/windowmanagerimp.cpp | 3 +++ 2 files changed, 7 insertions(+) diff --git a/apps/openmw/mwgui/hud.cpp b/apps/openmw/mwgui/hud.cpp index b4312dc40..13a5c559c 100644 --- a/apps/openmw/mwgui/hud.cpp +++ b/apps/openmw/mwgui/hud.cpp @@ -182,6 +182,10 @@ namespace MWGui HUD::~HUD() { + mMainWidget->eventMouseLostFocus.clear(); + mMainWidget->eventMouseMove.clear(); + mMainWidget->eventMouseButtonClick.clear(); + delete mSpellIcons; } diff --git a/apps/openmw/mwgui/windowmanagerimp.cpp b/apps/openmw/mwgui/windowmanagerimp.cpp index 8c397b9f1..975ee6c29 100644 --- a/apps/openmw/mwgui/windowmanagerimp.cpp +++ b/apps/openmw/mwgui/windowmanagerimp.cpp @@ -352,8 +352,11 @@ namespace MWGui WindowManager::~WindowManager() { + MyGUI::LanguageManager::getInstance().eventRequestTag.clear(); MyGUI::PointerManager::getInstance().eventChangeMousePointer.clear(); MyGUI::InputManager::getInstance().eventChangeKeyFocus.clear(); + MyGUI::ClipboardManager::getInstance().eventClipboardChanged.clear(); + MyGUI::ClipboardManager::getInstance().eventClipboardRequested.clear(); delete mConsole; delete mMessageBoxManager;