aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'graphics')
-rw-r--r--graphics/cursorman.cpp9
-rw-r--r--graphics/cursorman.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/graphics/cursorman.cpp b/graphics/cursorman.cpp
index c14dc0744f..f056cf86d4 100644
--- a/graphics/cursorman.cpp
+++ b/graphics/cursorman.cpp
@@ -31,6 +31,15 @@ DECLARE_SINGLETON(Graphics::CursorManager);
namespace Graphics {
+CursorManager::~CursorManager() {
+ for (int i = 0; i < _cursorStack.size(); ++i)
+ delete _cursorStack[i];
+ _cursorStack.clear();
+ for (int i = 0; i < _cursorPaletteStack.size(); ++i)
+ delete _cursorPaletteStack[i];
+ _cursorPaletteStack.clear();
+}
+
bool CursorManager::isVisible() {
if (_cursorStack.empty())
return false;
diff --git a/graphics/cursorman.h b/graphics/cursorman.h
index 1a5c116232..3536f27f9e 100644
--- a/graphics/cursorman.h
+++ b/graphics/cursorman.h
@@ -165,6 +165,7 @@ private:
// ourselves, so it is private and thus there is no way to create this class
// except from the Singleton code.
CursorManager() {}
+ ~CursorManager();
struct Cursor {
byte *_data;