-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JFactoryPodioT: only delete shallow object in ClearData #243
Conversation
I like this approach! Is this enough to make the heisenbug go away? I was a little worried that one of us would have to find a way to enforce that the podio::Frame gets deleted after all of the other mDatas. |
I think there is a small caveat here. I was focused on saving the case when mData is populated from objects managed by a collection, and did not appreciate that JANA in principle suggests that Set<> methods can be used too (which we don't do in EICrecon anymore). If it will be used, that would lead to a memory leak because of the |
Set<> methods don't allow appending on PODIO objects because PODIO collections don't allow it once they've been added to the frame. One reason the code looks so weird is because the PODIO objects go through the exact same procedure, regardless of whether the user adds them to a collection themselves and calls SetCollection(), or calls Set<> and lets JANA do it behind the scenes. (Yes, the difference in constraints on Set<> annoys me, but the alternative is far worse) TLDR; I think calling |
It appends to mData on subsequent calls: And I now see that the implementation of Insert() just ignores mData. |
Or rather Set doesn't append, but SetCollection does. So yeah, that's actually fine, I suppose. |
|
### Briefly, what does this PR introduce? This backports the bugfix patch in JeffersonLab/JANA2#243 to the 2.1.1 release.
Resolves #241