Revert "libutil: drop Pool resources on exceptional free"

This reverts commit de2884b82b376d10de5c400d8e73bc7d98f195d2.

Change-Id: I1fa301149d7c2ed3d266a40c15b2d010e12e44e6
This commit is contained in:
eldritch horrors
2024-04-05 20:13:02 +00:00
parent 52f741c23a
commit 38dc6f5b69
2 changed files with 1 additions and 23 deletions
+1 -8
View File
@@ -1,7 +1,6 @@
#pragma once
///@file
#include <exception>
#include <functional>
#include <limits>
#include <list>
@@ -119,7 +118,7 @@ public:
if (!r) return;
{
auto state_(pool.state.lock());
if (!bad && !std::uncaught_exceptions())
if (!bad)
state_->idle.push_back(ref<R>(r));
assert(state_->inUse);
state_->inUse--;
@@ -135,12 +134,6 @@ public:
Handle get()
{
// we do not want to handle the complexity that comes with allocating
// resources during stack unwinding. it would be possible to do this,
// but doing so requires more per-handle bookkeeping to properly free
// resources allocated during unwinding. that effort is not worth it.
assert(std::uncaught_exceptions() == 0);
{
auto state_(state.lock());