Skip to content

[QC-627] Set proper ownership of MO collection after deserialization#798

Merged
Barthelemy merged 1 commit into
AliceO2Group:masterfrom
knopers8:mergers-fix-leak
Aug 10, 2021
Merged

[QC-627] Set proper ownership of MO collection after deserialization#798
Barthelemy merged 1 commit into
AliceO2Group:masterfrom
knopers8:mergers-fix-leak

Conversation

@knopers8
Copy link
Copy Markdown
Collaborator

@knopers8 knopers8 commented Aug 6, 2021

This fixes the leaks reported in QC-627. The problem was that MonitorObjects in MonitorObjectCollection were indeed deleted, but they did not own the contained objects, so those were not.

As far as I could see, ROOT does not offer any method which allows to correct ownership after deserialization, so I added one in AliceO2Group/AliceO2#6811 and made sure it is executed after the received objects are unpacked.
In CheckRunner we used to assume that TObjArray is always non-owning, I had to fix that.

@knopers8 knopers8 requested a review from Barthelemy as a code owner August 6, 2021 11:37
@knopers8
Copy link
Copy Markdown
Collaborator Author

knopers8 commented Aug 6, 2021

Needs AliceO2Group/AliceO2#6811

@knopers8 knopers8 changed the title [WIP][QC-627] Set proper ownership of MO collection after deserialization [QC-627] Set proper ownership of MO collection after deserialization Aug 9, 2021
}
this->SetOwner(true);
delete it;
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ROOT objects ownership at its best.

@Barthelemy
Copy link
Copy Markdown
Collaborator

test failure unrelated, merging

@Barthelemy Barthelemy merged commit b0ae952 into AliceO2Group:master Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants