You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (mIsSubsetCollection) collection.setSubsetCollection(true);
for (T* item : aData) {
collection.push_back(*item);
}
SetCollection(std::move(collection));
}
copies objects and allows to leak memory (violates guarantees given by the Set method in JANA2). This causes actual leaks in the calorimetry factories.
Thanks for reopening this. It looks like the fix is simply to delete item after each collection.push_back(*item)? Even though this code is in eicrecon it really should be filed as a JANA issue as well since eicrecon::JFactoryPodioT is a standin for jana::JFactoryPodioT until we move to JANA2 v2.1.1. All that being said, we should really be calling SetCollection() instead because calling delete on every object is wildly inefficient.
EICrecon/src/services/io/podio/JFactoryPodioT.h
Lines 189 to 197 in 7596c65
copies objects and allows to leak memory (violates guarantees given by the
Set
method in JANA2). This causes actual leaks in the calorimetry factories.See also #731
The text was updated successfully, but these errors were encountered: