[Scummvm-git-logs] scummvm master -> cf8eeb8aad1b2dddd0a8a61d381d2dd96cba6d5f
dreammaster
paulfgilbert at gmail.com
Sat May 9 03:53:08 UTC 2020
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
611da44642 ULTIMA4: Fix shadow warning
cf8eeb8aad ULTIMA4: Memory leak fixes
Commit: 611da44642ea8c9a5cbcf6abe29adb73630a4e9d
https://github.com/scummvm/scummvm/commit/611da44642ea8c9a5cbcf6abe29adb73630a4e9d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-05-08T20:26:19-07:00
Commit Message:
ULTIMA4: Fix shadow warning
Changed paths:
engines/ultima/ultima4/map/tilemap.cpp
diff --git a/engines/ultima/ultima4/map/tilemap.cpp b/engines/ultima/ultima4/map/tilemap.cpp
index b38c2052f3..6ace82c652 100644
--- a/engines/ultima/ultima4/map/tilemap.cpp
+++ b/engines/ultima/ultima4/map/tilemap.cpp
@@ -61,11 +61,9 @@ void TileMaps::loadAll() {
}
void TileMaps::unloadAll() {
- iterator map;
-
// Free all the memory for the tile maps
- for (map = begin(); map != end(); map++)
- delete map->_value;
+ for (iterator it = begin(); it != end(); it++)
+ delete it->_value;
// Clear the map so we don't attempt to delete the memory again next time
clear();
Commit: cf8eeb8aad1b2dddd0a8a61d381d2dd96cba6d5f
https://github.com/scummvm/scummvm/commit/cf8eeb8aad1b2dddd0a8a61d381d2dd96cba6d5f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-05-08T20:52:32-07:00
Commit Message:
ULTIMA4: Memory leak fixes
Changed paths:
engines/ultima/ultima4/game/weapon.cpp
engines/ultima/ultima4/gfx/screen.cpp
diff --git a/engines/ultima/ultima4/game/weapon.cpp b/engines/ultima/ultima4/game/weapon.cpp
index 11b397af25..0f2124093e 100644
--- a/engines/ultima/ultima4/game/weapon.cpp
+++ b/engines/ultima/ultima4/game/weapon.cpp
@@ -34,6 +34,9 @@ Weapons::Weapons() : _confLoaded(false) {
}
Weapons::~Weapons() {
+ for (uint idx = 0; idx < size(); ++idx)
+ delete (*this)[idx];
+
g_weapons = nullptr;
}
diff --git a/engines/ultima/ultima4/gfx/screen.cpp b/engines/ultima/ultima4/gfx/screen.cpp
index a63b0a45ee..a58e470488 100644
--- a/engines/ultima/ultima4/gfx/screen.cpp
+++ b/engines/ultima/ultima4/gfx/screen.cpp
@@ -75,6 +75,9 @@ Screen::Screen() : _filterScaler(nullptr), _currentMouseCursor(-1),
Screen::~Screen() {
clear();
+ for (uint idx = 0; idx < _tileAnimSets.size(); ++idx)
+ delete _tileAnimSets[idx];
+
g_screen = nullptr;
}
More information about the Scummvm-git-logs
mailing list