diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-12-15 22:09:32 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-12-15 22:09:32 +0100 |
commit | 5dda8ec88d301948db5c81d47c17e78f2e1cab52 (patch) | |
tree | 49535faa6b16585eca2d14cac73c70cf86e1c11d /scene | |
parent | 1bbbb037c1d59ba6ad72687bac2de9dde205114b (diff) | |
parent | e173710963c3316833ac2e2c26ab3830551fd790 (diff) |
Merge pull request #70103 from timothyqiu/tween-cleanup
Fix possible Tween leak on exit
Diffstat (limited to 'scene')
-rw-r--r-- | scene/main/scene_tree.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index ceb5b76ff2..cec8bb9bd1 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -594,6 +594,12 @@ void SceneTree::finalize() { timer->release_connections(); } timers.clear(); + + // Cleanup tweens. + for (Ref<Tween> &tween : tweens) { + tween->clear(); + } + tweens.clear(); } void SceneTree::quit(int p_exit_code) { |