Fix possible Tween leak on exit

This commit is contained in:
Haoyu Qiu 2022-12-15 19:09:09 +08:00
parent fc9b6ef07f
commit e173710963

View file

@ -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) {