mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-09 12:22:51 +00:00
EMI: Free more memory properly
This commit is contained in:
parent
bdfea0265b
commit
a6a2cb71d4
@ -223,6 +223,9 @@ BitmapData::~BitmapData() {
|
||||
_bitmaps = nullptr;
|
||||
}
|
||||
}
|
||||
delete[] _texc;
|
||||
delete[] _layers;
|
||||
delete[] _verts;
|
||||
}
|
||||
|
||||
void BitmapData::freeData() {
|
||||
|
@ -416,6 +416,7 @@ EMIModel::EMIModel(const Common::String &filename, Common::SeekableReadStream *d
|
||||
_vertices = nullptr;
|
||||
_drawVertices = nullptr;
|
||||
_normals = nullptr;
|
||||
_drawNormals = nullptr;
|
||||
_colorMap = nullptr;
|
||||
_texVerts = nullptr;
|
||||
_numFaces = 0;
|
||||
@ -446,9 +447,16 @@ EMIModel::~EMIModel() {
|
||||
delete[] _vertices;
|
||||
delete[] _drawVertices;
|
||||
delete[] _normals;
|
||||
delete[] _drawNormals;
|
||||
delete[] _colorMap;
|
||||
delete[] _texVerts;
|
||||
delete[] _faces;
|
||||
for (uint32 i = 0; i < _numTextures; i++) {
|
||||
// Don't need to delete specialty textures as they are handled by the
|
||||
// graphics system
|
||||
if (!_texNames[i].contains("specialty"))
|
||||
delete _mats[i];
|
||||
}
|
||||
delete[] _texNames;
|
||||
delete[] _mats;
|
||||
delete[] _boneInfos;
|
||||
|
Loading…
x
Reference in New Issue
Block a user