Skip to content

Commit

Permalink
ACCESS: Fixes for memory leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Aug 28, 2014
1 parent 3592389 commit 3bbec48
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions engines/access/files.cpp
Expand Up @@ -51,9 +51,11 @@ CellIdent::CellIdent(int cell, int fileNum, int subfile) {
Resource::Resource() {
_stream = nullptr;
_size = 0;
_data = nullptr;
}

Resource::~Resource() {
delete _data;
delete _stream;
}

Expand Down
2 changes: 1 addition & 1 deletion engines/access/files.h
Expand Up @@ -101,7 +101,7 @@ class FileManager {
/**
* Check the existence of a given file
*/
bool FileManager::existFile(const Common::String &filename);
bool existFile(const Common::String &filename);

/**
* Load a given subfile from a container file
Expand Down
1 change: 1 addition & 0 deletions engines/access/room.cpp
Expand Up @@ -207,6 +207,7 @@ void Room::loadRoomData(const byte *roomData) {
if (roomInfo._animFile._fileNum != -1) {
Resource *anim = _vm->_files->loadFile(roomInfo._animFile);
_vm->_animation->loadAnimations(anim);
delete anim;
}

_vm->_scale = _vm->_scaleI = roomInfo._scaleI;
Expand Down

0 comments on commit 3bbec48

Please sign in to comment.