Skip to content

Commit

Permalink
do not free objects on pool destruction
Browse files Browse the repository at this point in the history
  • Loading branch information
kpschoedel committed Nov 16, 2021
1 parent 0c9ab88 commit 9d158a2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/lib/support/Pool.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ class BitMapObjectPool : public internal::StaticAllocatorBitmap, public internal
{
public:
BitMapObjectPool() : StaticAllocatorBitmap(mData.mMemory, mUsage, N, sizeof(T)) {}
~BitMapObjectPool() { ReleaseAll(); }
~BitMapObjectPool() {
// ReleaseAll();
}

template <typename... Args>
T * CreateObject(Args &&... args)
Expand Down Expand Up @@ -239,7 +241,10 @@ class HeapObjectPool : public internal::Statistics, public internal::PoolCommon<
{
public:
HeapObjectPool() {}
~HeapObjectPool() { ReleaseAll(); }
~HeapObjectPool() {
// TODO(#11880): Release all active objects (or verify that none are active) when destroying the pool.
// ReleaseAll();
}

template <typename... Args>
T * CreateObject(Args &&... args)
Expand Down

0 comments on commit 9d158a2

Please sign in to comment.