HDB: Fix more memory leaks

This commit is contained in:
Nipun Garg 2019-07-18 18:40:40 +05:30 committed by Eugene Sandulenko
parent 8d9004e432
commit fd91bb7f59
3 changed files with 13 additions and 0 deletions

View File

@ -29,6 +29,8 @@ namespace HDB {
FileMan::FileMan() {
_mpcFile = new Common::File;
for (uint i = 0; i < _dir.size(); i++)
delete _dir[i];
}
FileMan::~FileMan() {

View File

@ -52,6 +52,13 @@ Gfx::~Gfx() {
for (int i = 0; i < _fontHeader.numChars; i++)
_fontSurfaces[i].free();
_globalSurface.free();
delete[] _tLookupArray;
for (int i = 0; i < 8; i++)
delete _mousePointer[i];
for (int i = 0; i < 4; i++)
delete _starField[i];
delete _snowflake;
delete _skyClouds;
}
bool Gfx::init() {

View File

@ -41,6 +41,10 @@ Map::Map() {
}
Map::~Map() {
delete[] _background;
delete[] _foreground;
delete[] _iconList;
free(_mapExplosions);
free(_mapExpBarrels);
free(_mapLaserBeams);