1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-16 14:00:40 +00:00

Merge pull request #30223 from qarmin/properly_delete_thread

Remove thread to prevent memory leak
This commit is contained in:
Rémi Verschelde
2019-07-02 11:26:29 +02:00
committed by GitHub

View File

@@ -2702,6 +2702,8 @@ Variant _Thread::wait_to_finish() {
target_method = StringName();
target_instance = NULL;
userdata = Variant();
if (thread)
memdelete(thread);
thread = NULL;
return r;