diff options
author | Paul Gilbert | 2011-03-09 21:16:12 +1100 |
---|---|---|
committer | Paul Gilbert | 2011-03-09 21:16:12 +1100 |
commit | 0674d8829944868ac32a3696dd0e65655d00ed99 (patch) | |
tree | 5c531caca6c03dcc2bd6fe4b9c667e339399bdd6 /engines | |
parent | 4d41b13890189f654409087187dc87772f90b91f (diff) | |
download | scummvm-rg350-0674d8829944868ac32a3696dd0e65655d00ed99.tar.gz scummvm-rg350-0674d8829944868ac32a3696dd0e65655d00ed99.tar.bz2 scummvm-rg350-0674d8829944868ac32a3696dd0e65655d00ed99.zip |
TSAGE: Fixed memory leak when changing SceneObjectWrapper objects
Diffstat (limited to 'engines')
-rw-r--r-- | engines/tsage/core.cpp | 4 | ||||
-rw-r--r-- | engines/tsage/core.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp index 38d21d98be..8cc0589a85 100644 --- a/engines/tsage/core.cpp +++ b/engines/tsage/core.cpp @@ -1546,6 +1546,10 @@ void SceneObjectWrapper::synchronise(Serialiser &s) { SYNC_POINTER(_sceneObject); } +void SceneObjectWrapper::remove() { + delete this; +} + void SceneObjectWrapper::dispatch() { _visageImages.setVisage(_sceneObject->_visage); int frameCount = _visageImages.getFrameCount(); diff --git a/engines/tsage/core.h b/engines/tsage/core.h index ebaab0d4e7..a2588f4273 100644 --- a/engines/tsage/core.h +++ b/engines/tsage/core.h @@ -455,6 +455,7 @@ public: virtual void synchronise(Serialiser &s); virtual Common::String getClassName() { return "SceneObjectWrapper"; } + virtual void remove(); virtual void dispatch(); }; |