diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/thread_work_pool.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/thread_work_pool.h b/core/thread_work_pool.h index 3dedb40752..214d2c4aa7 100644 --- a/core/thread_work_pool.h +++ b/core/thread_work_pool.h @@ -43,6 +43,7 @@ class ThreadWorkPool { std::atomic<uint32_t> *index; uint32_t max_elements; virtual void work() = 0; + virtual ~BaseWork() = default; }; template <class C, class M, class U> @@ -98,6 +99,8 @@ public: threads[i].completed.wait(); threads[i].work = nullptr; } + + memdelete(w); } void init(int p_thread_count = -1); |