diff --git a/ParallelAccessStore.h b/ParallelAccessStore.h index f0cc078f..5fee8445 100644 --- a/ParallelAccessStore.h +++ b/ParallelAccessStore.h @@ -133,7 +133,7 @@ template void ParallelAccessStore::remove(const Key &key, cpputils::unique_ref resource) { auto insertResult = _resourcesToRemove.emplace(key, std::promise>()); assert(true == insertResult.second); - cpputils::to_unique_ptr(std::move(resource)).reset(); // Call destructor + cpputils::destruct(std::move(resource)); //Wait for last resource user to release it auto resourceToRemove = insertResult.first->second.get_future().get();