From 36976cb5509c553d13affb94835448e9de9b910c Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Thu, 10 Sep 2020 09:53:02 +0200 Subject: [PATCH] util/threadpool: Don't hold work endlessly after processing it --- source/util/util-threadpool.cpp | 3 +++ 1 file changed, 3 insertions(+) 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);