diff --git a/source/util/util-threadpool.cpp b/source/util/util-threadpool.cpp index 1c597ba..3104070 100644 --- a/source/util/util-threadpool.cpp +++ b/source/util/util-threadpool.cpp @@ -112,6 +112,9 @@ void util::threadpool::work() reinterpret_cast(local_work->_data.get())); } } + + // Remove our reference to the work unit. + local_work.reset(); } _worker_idx.fetch_sub(1);