aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2018-04-04 22:41:12 +0200
committerEugene Sandulenko2018-04-04 22:41:12 +0200
commit21ef072c11f34959cbabf7aa831ed5496ccfc37b (patch)
tree75571ea01b70ac87c4b7e733ac5883081446ac38
parentf0dfc19f29dab5961598f625a24a922172d06912 (diff)
downloadscummvm-rg350-21ef072c11f34959cbabf7aa831ed5496ccfc37b.tar.gz
scummvm-rg350-21ef072c11f34959cbabf7aa831ed5496ccfc37b.tar.bz2
scummvm-rg350-21ef072c11f34959cbabf7aa831ed5496ccfc37b.zip
BLADERUNNER: Fix memory leaks
-rw-r--r--engines/bladerunner/obstacles.cpp2
-rw-r--r--engines/bladerunner/ui/end_credits.cpp3
2 files changed, 5 insertions, 0 deletions
diff --git a/engines/bladerunner/obstacles.cpp b/engines/bladerunner/obstacles.cpp
index ada41df7b3..69d1ba47c3 100644
--- a/engines/bladerunner/obstacles.cpp
+++ b/engines/bladerunner/obstacles.cpp
@@ -38,6 +38,8 @@ Obstacles::Obstacles(BladeRunnerEngine *vm) {
Obstacles::~Obstacles() {
delete[] _vertices;
+ delete[] _polygonsBackup;
+ delete[] _polygons;
}
void Obstacles::clear() {
diff --git a/engines/bladerunner/ui/end_credits.cpp b/engines/bladerunner/ui/end_credits.cpp
index 1ab0b9f8a3..6d964d0290 100644
--- a/engines/bladerunner/ui/end_credits.cpp
+++ b/engines/bladerunner/ui/end_credits.cpp
@@ -160,6 +160,9 @@ void EndCredits::show() {
free(textPositions);
delete textResource;
+ delete fontSmall;
+ delete fontBig;
+
_vm->_music->stop(0);
_vm->_mouse->enable();
}