[Scummvm-git-logs] scummvm master -> 27b314cb25a786c9ecffcef6bc0589c500257b4d
rvanlaar
noreply at scummvm.org
Sat Sep 24 19:29:01 UTC 2022
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:
27b314cb25 DIRECTOR: fix memleak when lingo context is frozen
Commit: 27b314cb25a786c9ecffcef6bc0589c500257b4d
https://github.com/scummvm/scummvm/commit/27b314cb25a786c9ecffcef6bc0589c500257b4d
Author: Roland van Laar (roland at rolandvanlaar.nl)
Date: 2022-09-24T21:28:22+02:00
Commit Message:
DIRECTOR: fix memleak when lingo context is frozen
Cleanup the lingo callstack when closing.
When a movie calls `go frameId` a big pause button is hit
and everything is put into order to not go to the frame +1
but to the requested frameId. That big pause button is called
`_freezeContext`.
However when quitting in the middle of a frozen context
there are lingo frames left on the callstack.
This can be reliably reproduced with a plethora of D2 and D3 movies
with the debugflags fewframesonly,fast.
Changed paths:
engines/director/window.cpp
diff --git a/engines/director/window.cpp b/engines/director/window.cpp
index d34b36b987d..96d71e73b5c 100644
--- a/engines/director/window.cpp
+++ b/engines/director/window.cpp
@@ -76,6 +76,12 @@ Window::~Window() {
delete _macBinary;
_macBinary = nullptr;
}
+
+ for (auto &it: _callstack) {
+ delete it;
+ }
+ delete _retContext;
+ delete _retLocalVars;
}
void Window::invertChannel(Channel *channel, const Common::Rect &destRect) {
More information about the Scummvm-git-logs
mailing list