diff options
author | Filippos Karapetis | 2009-10-30 22:50:21 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-10-30 22:50:21 +0000 |
commit | 29fb3b0f3fca31c36f13175627f9bc06effe8e97 (patch) | |
tree | b98926138c48a1475c5c8f03cd8340b851edaf05 /engines | |
parent | 92fdf79d5bd8c601d8e39b673c1a8436aef13e4e (diff) | |
download | scummvm-rg350-29fb3b0f3fca31c36f13175627f9bc06effe8e97.tar.gz scummvm-rg350-29fb3b0f3fca31c36f13175627f9bc06effe8e97.tar.bz2 scummvm-rg350-29fb3b0f3fca31c36f13175627f9bc06effe8e97.zip |
Plugged some memory leaks in the new graphics code
svn-id: r45550
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/gui/gui.cpp | 6 | ||||
-rw-r--r-- | engines/sci/gui/gui_font.cpp | 1 | ||||
-rw-r--r-- | engines/sci/gui/gui_text.cpp | 7 |
3 files changed, 12 insertions, 2 deletions
diff --git a/engines/sci/gui/gui.cpp b/engines/sci/gui/gui.cpp index 15087adf4d..90695b7f7d 100644 --- a/engines/sci/gui/gui.cpp +++ b/engines/sci/gui/gui.cpp @@ -68,6 +68,12 @@ SciGui::SciGui() { } SciGui::~SciGui() { + delete _controls; + delete _windowMgr; + delete _text; + delete _animate; + delete _transitions; + delete _gfx; } void SciGui::resetEngineState(EngineState *s) { diff --git a/engines/sci/gui/gui_font.cpp b/engines/sci/gui/gui_font.cpp index d903d18f4c..1ae82d491b 100644 --- a/engines/sci/gui/gui_font.cpp +++ b/engines/sci/gui/gui_font.cpp @@ -57,6 +57,7 @@ SciGuiFont::SciGuiFont(ResourceManager *resMan, GuiResourceId resourceId) } SciGuiFont::~SciGuiFont() { + delete _chars; _resMan->unlockResource(_resource); } diff --git a/engines/sci/gui/gui_text.cpp b/engines/sci/gui/gui_text.cpp index 91cc02a0f5..329bf5a2ce 100644 --- a/engines/sci/gui/gui_text.cpp +++ b/engines/sci/gui/gui_text.cpp @@ -41,12 +41,15 @@ SciGuiText::SciGuiText(ResourceManager *resMan, SciGuiGfx *gfx, SciGuiScreen *sc } SciGuiText::~SciGuiText() { + delete _font; } void SciGuiText::init() { _font = NULL; - _codeFonts = NULL; _codeFontsCount = 0; - _codeColors = NULL; _codeColorsCount = 0; + _codeFonts = NULL; + _codeFontsCount = 0; + _codeColors = NULL; + _codeColorsCount = 0; } GuiResourceId SciGuiText::GetFontId() { |