diff --git a/src/ds/tools/ObjectPool.hx b/src/ds/tools/ObjectPool.hx index 91a027b..e992e8a 100644 --- a/src/ds/tools/ObjectPool.hx +++ b/src/ds/tools/ObjectPool.hx @@ -140,7 +140,6 @@ class ObjectPool { #if debug assert(!mSet.has(obj), 'object $obj was returned twice to the pool'); - mSet.set(obj); #end if (size == maxSize) @@ -149,6 +148,9 @@ class ObjectPool { if (size == mCapacity) resize(); mPool.set(size++, obj); + #if debug + mSet.set(obj); + #end } }