From 21cfb4c0c7ee9ec3e833beb47a7ecd5d8494b862 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Thu, 4 Feb 2010 19:33:36 +0000 Subject: SCI: cleaning up deleting of graphic objects svn-id: r47884 --- engines/sci/graphics/gui.cpp | 4 +--- engines/sci/graphics/gui32.cpp | 3 ++- engines/sci/sci.cpp | 9 ++++++--- 3 files changed, 9 insertions(+), 7 deletions(-) (limited to 'engines') diff --git a/engines/sci/graphics/gui.cpp b/engines/sci/graphics/gui.cpp index 16a72df148..f6d5650b26 100644 --- a/engines/sci/graphics/gui.cpp +++ b/engines/sci/graphics/gui.cpp @@ -72,11 +72,9 @@ SciGui::~SciGui() { delete _controls; delete _text16; delete _animate; - delete _transitions; delete _paint16; - delete _ports; + delete _transitions; delete _compare; - delete _cache; } void SciGui::resetEngineState(EngineState *s) { diff --git a/engines/sci/graphics/gui32.cpp b/engines/sci/graphics/gui32.cpp index 19e5031ed9..132ae67a85 100644 --- a/engines/sci/graphics/gui32.cpp +++ b/engines/sci/graphics/gui32.cpp @@ -55,8 +55,9 @@ SciGui32::SciGui32(EngineState *state, GfxScreen *screen, GfxPalette *palette, G } SciGui32::~SciGui32() { + delete _frameout; + delete _paint32; delete _compare; - delete _cache; } void SciGui32::resetEngineState(EngineState *s) { diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index e01e0fdac0..65c18e8583 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -250,11 +250,14 @@ Common::Error SciEngine::run() { delete _gamestate->_soundCmd; delete _gamestate->_gui; + delete _gamestate->_gui32; + delete _gamestate->_gfxPorts; + delete _gamestate->_gfxCache; + delete _gamestate->_gfxPalette; + delete cursor; + delete _gamestate->_gfxScreen; delete _gamestate->_event; delete segMan; - delete cursor; - delete palette; - delete screen; delete _gamestate; return Common::kNoError; -- cgit v1.2.3