Delete objects enqueued for deletion during SceneTree destruction
This commit is contained in:
parent
33a42160a0
commit
ae96da28d8
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