Explorar o código

Remove thread to prevent memory leak

qarmin %!s(int64=6) %!d(string=hai) anos
pai
achega
6edd06e566
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      core/bind/core_bind.cpp

+ 2 - 0
core/bind/core_bind.cpp

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