Browse Source

Remove thread to prevent memory leak

qarmin 6 năm trước cách đây
mục cha
commit
6edd06e566
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  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;