Skip to content

Properly handle object lifetime - #2690

Merged
Barthelemy merged 1 commit into
AliceO2Group:masterfrom
ktf:pr2690
Sep 15, 2026
Merged

Barthelemy merged 1 commit into
AliceO2Group:masterfrom
ktf:pr2690

Conversation

@ktf

@ktf ktf commented Sep 15, 2026

Copy link
Copy Markdown
Member

Taking ownership of DPL provided objects is wrong.

Taking ownership of DPL provided objects is wrong.
@ktf ktf mentioned this pull request Sep 15, 2026
@Barthelemy

Copy link
Copy Markdown
Collaborator

I'll let @knopers8 review it
Then I will make a new minor version.

@knopers8 knopers8 left a comment

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.

Out of curiosity, did it cause trouble or are you just fixing a warning? It looks like the pointer is never accessed outside of this scope.

And speaking of stealing the framework's belongings, we also do this ;)

iCtx.services().get<CallbackService>().set<CallbackService::Id::Start>([this, services = iCtx.services()]() mutable { start(services); });

@Barthelemy
Barthelemy merged commit 4a8e459 into AliceO2Group:master Sep 15, 2026
6 checks passed
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.

3 participants