Remove thread to prevent memory leak

This commit is contained in:
qarmin 2019-07-01 15:07:06 +02:00
parent ab9c14cca6
commit 6edd06e566

View file

@ -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;