From 6edd06e56685df3ea237830f3602e7e580e1f338 Mon Sep 17 00:00:00 2001 From: qarmin Date: Mon, 1 Jul 2019 15:07:06 +0200 Subject: Remove thread to prevent memory leak --- core/bind/core_bind.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core/bind/core_bind.cpp') diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index da7b15da94..242c5b3bf1 100644 --- a/core/bind/core_bind.cpp +++ b/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; -- cgit v1.2.3