aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorMax Horn2008-03-26 19:29:33 +0000
committerMax Horn2008-03-26 19:29:33 +0000
commitb0c6a12c81c949c7f61b6639b509dad2b4fbb862 (patch)
treea20a4c62707dee6bad3a45fc2b3409d86c7377ce /backends
parentafed582280195bc0165e93af7003aadea6438c89 (diff)
downloadscummvm-rg350-b0c6a12c81c949c7f61b6639b509dad2b4fbb862.tar.gz
scummvm-rg350-b0c6a12c81c949c7f61b6639b509dad2b4fbb862.tar.bz2
scummvm-rg350-b0c6a12c81c949c7f61b6639b509dad2b4fbb862.zip
Modified Patch #1925352: Memory leak fixes
svn-id: r31244
Diffstat (limited to 'backends')
-rw-r--r--backends/platform/sdl/graphics.cpp1
-rw-r--r--backends/platform/sdl/sdl.cpp14
2 files changed, 15 insertions, 0 deletions
diff --git a/backends/platform/sdl/graphics.cpp b/backends/platform/sdl/graphics.cpp
index b9d1e37c05..4a5c143712 100644
--- a/backends/platform/sdl/graphics.cpp
+++ b/backends/platform/sdl/graphics.cpp
@@ -459,6 +459,7 @@ void OSystem_SDL::unloadGFXMode() {
_osdSurface = NULL;
}
#endif
+ DestroyScalers();
}
void OSystem_SDL::hotswapGFXMode() {
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index 4394b6c253..d5db665f21 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -309,9 +309,23 @@ void OSystem_SDL::quit() {
if (_joystick)
SDL_JoystickClose(_joystick);
SDL_ShowCursor(SDL_ENABLE);
+
+ SDL_RemoveTimer(_timerID);
+ SDL_CloseAudio();
+
+ free(_dirtyChecksums);
+ free(_currentPalette);
+ free(_cursorPalette);
+ free(_mouseData);
+
+ delete _savefile;
+ delete _mixer;
+ delete _timer;
+
SDL_Quit();
delete getEventManager();
+
exit(0);
}