diff options
author | Robert Göffringmann | 2004-11-09 04:06:10 +0000 |
---|---|---|
committer | Robert Göffringmann | 2004-11-09 04:06:10 +0000 |
commit | 021f2cbccedfd2ed197bb4c54c3d5cf1fc3ca89f (patch) | |
tree | 44168e257d52b634893f7d01e3ed717fb0326bef /sword1/mouse.cpp | |
parent | daee2edcfea567456bc94534e1cadcd988b6ad69 (diff) | |
download | scummvm-rg350-021f2cbccedfd2ed197bb4c54c3d5cf1fc3ca89f.tar.gz scummvm-rg350-021f2cbccedfd2ed197bb4c54c3d5cf1fc3ca89f.tar.bz2 scummvm-rg350-021f2cbccedfd2ed197bb4c54c3d5cf1fc3ca89f.zip |
free memory on quit.
Still leaks some, though
svn-id: r15735
Diffstat (limited to 'sword1/mouse.cpp')
-rw-r--r-- | sword1/mouse.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sword1/mouse.cpp b/sword1/mouse.cpp index a979bfcf45..c799cdb7eb 100644 --- a/sword1/mouse.cpp +++ b/sword1/mouse.cpp @@ -40,6 +40,14 @@ Mouse::Mouse(OSystem *system, ResMan *pResMan, ObjectMan *pObjMan) { _currentPtr = NULL; } +Mouse::~Mouse(void) { + setLuggage(0, 0); + setPointer(0, 0); + + for (uint8 cnt = 0; cnt < 17; cnt++) // force res manager to keep mouse + _resMan->resClose(MSE_POINTER + cnt); // cursors in memory all the time +} + void Mouse::initialize(void) { _numObjs = 0; Logic::_scriptVars[MOUSE_STATUS] = 0; // mouse off and unlocked |