Merge pull request #53572 from kleonc/scene-tree-free-objects-queued-during-destruction-3x
This commit is contained in:
commit
c00848ae03
1 changed files with 5 additions and 1 deletions
|
@ -621,7 +621,11 @@ void SceneTree::finish() {
|
|||
root = nullptr;
|
||||
}
|
||||
|
||||
// cleanup timers
|
||||
// In case deletion of some objects was queued when destructing the `root`.
|
||||
// E.g. if `queue_free()` was called for some node outside the tree when handling NOTIFICATION_PREDELETE for some node in the tree.
|
||||
_flush_delete_queue();
|
||||
|
||||
// Cleanup timers.
|
||||
for (List<Ref<SceneTreeTimer>>::Element *E = timers.front(); E; E = E->next()) {
|
||||
E->get()->release_connections();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue