diff --git a/roofit/roofitcore/src/MemPoolForRooSets.h b/roofit/roofitcore/src/MemPoolForRooSets.h index 388a3e7f3f603dc5d15bde6726fdb6bbb04944e2..a9b5218d66c2dd553188af1ae71298cadb3d3e5f 100644 --- a/roofit/roofitcore/src/MemPoolForRooSets.h +++ b/roofit/roofitcore/src/MemPoolForRooSets.h @@ -126,6 +126,7 @@ class MemPoolForRooSets { { if (inPool(ptr)) { --refCount; + tryFree(false); #ifndef NDEBUG const std::size_t index = static_cast<RooSet_t *>(ptr) - memBegin; if (deletedElements.count(index) != 0) {