[Scummvm-git-logs] scummvm master -> 836fbe42a288f9abc9cd0e09279708efde071c5e
antoniou79
noreply at scummvm.org
Sat May 20 09:02:42 UTC 2023
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
836fbe42a2 TOON: Free memory when movie and subtitles are destroyed
Commit: 836fbe42a288f9abc9cd0e09279708efde071c5e
https://github.com/scummvm/scummvm/commit/836fbe42a288f9abc9cd0e09279708efde071c5e
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2023-05-20T12:01:25+03:00
Commit Message:
TOON: Free memory when movie and subtitles are destroyed
Leaks reported when running with aSan
Changed paths:
engines/toon/movie.cpp
engines/toon/subtitles.cpp
diff --git a/engines/toon/movie.cpp b/engines/toon/movie.cpp
index 97be1be1902..ad5c180587e 100644
--- a/engines/toon/movie.cpp
+++ b/engines/toon/movie.cpp
@@ -72,6 +72,7 @@ Movie::Movie(ToonEngine *vm , ToonstruckSmackerDecoder *decoder) {
Movie::~Movie() {
delete _decoder;
+ delete _subtitle;
}
void Movie::init() const {
diff --git a/engines/toon/subtitles.cpp b/engines/toon/subtitles.cpp
index 332c70654c1..e43a19386be 100644
--- a/engines/toon/subtitles.cpp
+++ b/engines/toon/subtitles.cpp
@@ -33,6 +33,10 @@ SubtitleRenderer::SubtitleRenderer(ToonEngine *vm) : _vm(vm) {
}
SubtitleRenderer::~SubtitleRenderer() {
+ if (_subSurface) {
+ _subSurface->free();
+ delete _subSurface;
+ }
}
More information about the Scummvm-git-logs
mailing list