Skip to content

Rule of Five: Delete copy ops and add move semantics for Concore#470

Merged
pradeeban merged 1 commit intoControlCore-Project:devfrom
avinxshKD:fix/rule-of-five-469
Mar 1, 2026
Merged

Rule of Five: Delete copy ops and add move semantics for Concore#470
pradeeban merged 1 commit intoControlCore-Project:devfrom
avinxshKD:fix/rule-of-five-469

Conversation

@avinxshKD
Copy link

Concore owns SHM handles and has a destructor, but copy/move semantics weren't explicitly defined. This meant you could accidentally copy an instance and end up with two destructors trying to detach/remove the same shared memory, which is bad.

Deleted copy ctor/assignment and added move semantics so handles get transferred safely, the old instance just nulls them out and becomes harmless.

Fixes #469

@avinxshKD
Copy link
Author

avinxshKD commented Feb 28, 2026

Hey @Rahuljagwani @pradeeban also checked concoredocker.hpp, it looks like it may have similar resource ownership patterns. Happy address it separately or any suggestions pls let me know

@pradeeban
Copy link
Member

@avinxshKD sure, go ahead with the docker impl as well.

@pradeeban pradeeban merged commit 23a28d6 into ControlCore-Project:dev Mar 1, 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants