Remove thread to prevent memory leak
This commit is contained in:
parent
ab9c14cca6
commit
6edd06e566
1 changed files with 2 additions and 0 deletions
|
@ -2700,6 +2700,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;
|
||||||
|
|
Loading…
Reference in a new issue