diff options
author | Thomas Fach-Pedersen | 2014-05-30 13:52:59 -0700 |
---|---|---|
committer | Eugene Sandulenko | 2016-09-29 22:33:35 +0200 |
commit | eefea240c72a464857fbe463b8604c6ffa112e8f (patch) | |
tree | f17fb0fc64513199539036a4f1ff585a39052557 /engines/bladerunner | |
parent | 691d0f9888830699861a9406a4c5fc6bff5c5aef (diff) | |
download | scummvm-rg350-eefea240c72a464857fbe463b8604c6ffa112e8f.tar.gz scummvm-rg350-eefea240c72a464857fbe463b8604c6ffa112e8f.tar.bz2 scummvm-rg350-eefea240c72a464857fbe463b8604c6ffa112e8f.zip |
BLADERUNNER: Fix memory leaks in BladeRunnerEngine
Diffstat (limited to 'engines/bladerunner')
-rw-r--r-- | engines/bladerunner/bladerunner.cpp | 13 | ||||
-rw-r--r-- | engines/bladerunner/bladerunner.h | 1 |
2 files changed, 12 insertions, 2 deletions
diff --git a/engines/bladerunner/bladerunner.cpp b/engines/bladerunner/bladerunner.cpp index b8bfce98b4..4791be9aca 100644 --- a/engines/bladerunner/bladerunner.cpp +++ b/engines/bladerunner/bladerunner.cpp @@ -42,17 +42,26 @@ namespace BladeRunner { BladeRunnerEngine::BladeRunnerEngine(OSystem *syst) : Engine(syst) { - _gameInfo = nullptr; - _windowIsActive = true; _gameIsRunning = true; _chapters = nullptr; + _gameInfo = nullptr; _scene = new Scene(this); _script = new Script(this); _settings = new Settings(this); } +BladeRunnerEngine::~BladeRunnerEngine() { + delete _settings; + delete _script; + delete _scene; + delete _gameInfo; + delete _chapters; + + _surface1.free(); +} + bool BladeRunnerEngine::hasFeature(EngineFeature f) const { return f == kSupportsRTL; } diff --git a/engines/bladerunner/bladerunner.h b/engines/bladerunner/bladerunner.h index 353a003641..60d87efe00 100644 --- a/engines/bladerunner/bladerunner.h +++ b/engines/bladerunner/bladerunner.h @@ -62,6 +62,7 @@ private: public: BladeRunnerEngine(OSystem *syst); + ~BladeRunnerEngine(); bool hasFeature(EngineFeature f) const; |