From e82f930e4804c5ae7bb4fdb86286eb8acea34d11 Mon Sep 17 00:00:00 2001 From: raiqarasool Date: Wed, 6 Nov 2024 09:59:25 -0500 Subject: [PATCH] Removed JEvent use check when it is returning to pool --- src/libraries/JANA/Topology/JEventPool.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/libraries/JANA/Topology/JEventPool.h b/src/libraries/JANA/Topology/JEventPool.h index 37dd4f4c2..6b00009dc 100644 --- a/src/libraries/JANA/Topology/JEventPool.h +++ b/src/libraries/JANA/Topology/JEventPool.h @@ -99,10 +99,6 @@ class JEventPool { item->Clear(); } auto use_count = item->shared_from_this().use_count(); - if (use_count > 2) { - // Use count should be 2 because there's the shared_ptr in `m_owned_events`, and there's the temporary shared_ptr created just now - throw JException("Attempted to return a JEvent to the pool while it is still being used! use_count=%d", use_count); - } LocalPool& pool = *(m_pools[location]);