Remove thread to prevent memory leak

This commit is contained in:
qarmin 2019-07-01 15:07:06 +02:00
parent ab9c14cca6
commit 6edd06e566
1 changed files with 2 additions and 0 deletions

View File

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