Merge pull request #30223 from qarmin/properly_delete_thread
Remove thread to prevent memory leak
This commit is contained in:
commit
c486b8dac0
1 changed files with 2 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue