BLADERUNNER: Fix memory leaks in BladeRunnerEngine

This commit is contained in:
Thomas Fach-Pedersen
2016-09-29 22:33:35 +02:00
committed by Eugene Sandulenko
parent 691d0f9888
commit eefea240c7
2 changed files with 12 additions and 2 deletions
+11 -2
View File
@@ -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;
}
+1
View File
@@ -62,6 +62,7 @@ private:
public:
BladeRunnerEngine(OSystem *syst);
~BladeRunnerEngine();
bool hasFeature(EngineFeature f) const;