diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-07-02 11:26:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-02 11:26:29 +0200 |
commit | c486b8dac04edfe2d35f1ee0bc0b3b410f4175ae (patch) | |
tree | 6eb720d08c4db9d27e88336118e7ca9d454eaa9c /core/bind/core_bind.cpp | |
parent | d2c416ec62e65fd42ff1bbf493cf06689e4d1b60 (diff) | |
parent | 6edd06e56685df3ea237830f3602e7e580e1f338 (diff) | |
download | redot-engine-c486b8dac04edfe2d35f1ee0bc0b3b410f4175ae.tar.gz |
Merge pull request #30223 from qarmin/properly_delete_thread
Remove thread to prevent memory leak
Diffstat (limited to 'core/bind/core_bind.cpp')
-rw-r--r-- | core/bind/core_bind.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index f9fb7d7695..ba9bd10bfd 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -2702,6 +2702,8 @@ Variant _Thread::wait_to_finish() { target_method = StringName(); target_instance = NULL; userdata = Variant(); + if (thread) + memdelete(thread); thread = NULL; return r; |