You've already forked godot
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:
@@ -2702,6 +2702,8 @@ Variant _Thread::wait_to_finish() {
|
|||||||
target_method = StringName();
|
target_method = StringName();
|
||||||
target_instance = NULL;
|
target_instance = NULL;
|
||||||
userdata = Variant();
|
userdata = Variant();
|
||||||
|
if (thread)
|
||||||
|
memdelete(thread);
|
||||||
thread = NULL;
|
thread = NULL;
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
|
|||||||
Reference in New Issue
Block a user