From 3653f03d30a7610a2648485f1f4f5b3de90eb8ad Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 12 Dec 2016 20:19:31 +0100 Subject: FULLPIPE: Plug more memory leaks --- engines/fullpipe/gfx.cpp | 2 ++ engines/fullpipe/input.cpp | 3 +++ engines/fullpipe/statics.cpp | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 573de78b98..ac306bda8b 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -603,6 +603,8 @@ void Picture::getDibInfo() { _bitmap->decode((int32 *)(_paletteData ? _paletteData : g_fp->_globalPalette)); _bitmap->_pixels = 0; + + delete s; } Bitmap *Picture::getPixelData() { diff --git a/engines/fullpipe/input.cpp b/engines/fullpipe/input.cpp index 55735624c6..55bc21716e 100644 --- a/engines/fullpipe/input.cpp +++ b/engines/fullpipe/input.cpp @@ -56,6 +56,9 @@ InputController::~InputController() { removeMessageHandler(126, -1); g_fp->_inputController = 0; + + for (int i = 0; i < _cursorsArray.size(); i++) + delete _cursorsArray[i]; } void InputController::setInputDisabled(bool state) { diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index ece4f43e9f..ab4e757c84 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -1539,7 +1539,7 @@ Movement::~Movement() { for (uint i = 0; i < _dynamicPhases.size(); i++) delete _framePosOffsets[i]; - if (!_currMovement ) { + if (!_currMovement) { if (_updateFlag1) _dynamicPhases.remove_at(0); -- cgit v1.2.3