Skip to content

Commit

Permalink
TONY: Fixed some more Valgrind identified memory leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed May 5, 2012
1 parent 0466200 commit e0a7b42
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
9 changes: 6 additions & 3 deletions engines/tony/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1412,9 +1412,12 @@ void RMPointer::Init(void) {
void RMPointer::Close(void) {
int i;

for (i = 0; i < 1; i++)
if (m_pointer[i] != NULL)
delete m_pointer[i], m_pointer[i] = NULL;
for (i = 0; i < 5; i++) {
if (m_pointer[i] != NULL) {
delete m_pointer[i];
m_pointer[i] = NULL;
}
}
}


Expand Down
1 change: 1 addition & 0 deletions engines/tony/tony.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ void TonyEngine::Close(void) {
RMText::Unload();
_theEngine.Close();
m_wnd.Close();
delete[] m_curThumbnail;
}

void TonyEngine::SwitchFullscreen(bool bFull) {
Expand Down

0 comments on commit e0a7b42

Please sign in to comment.