From c31bb02a3ec8ff9db65badb1b9f0ab5569739fab Mon Sep 17 00:00:00 2001 From: Ryan Roden-Corrent Date: Sat, 23 Jan 2021 12:53:22 -0500 Subject: [PATCH] Clarify that create_timer does not require cleanup. This is how I would expect it to work, but the docs didn't clarify, so I had to check the source just to make sure I wasn't responsible for freeing the timer: https://github.com/godotengine/godot/blob/d39f6386ce3a7916dbb94fef5ff65e7599e060f0/scene/main/scene_tree.cpp#L473 (cherry picked from commit 6e7e4f82ecd142f280ae344c769978d3e92cca54) --- doc/classes/SceneTree.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml index 72a3dfd9cd9..e52051bfafe 100644 --- a/doc/classes/SceneTree.xml +++ b/doc/classes/SceneTree.xml @@ -77,6 +77,7 @@ yield(get_tree().create_timer(1.0), "timeout") print("end") [/codeblock] + The timer will be automatically freed after its time elapses.