Skip to content
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

GenericRAII stores only a reference to cleanup function and renamed to ScopeGuard #1450

Closed
MatthiasKillat opened this issue Jul 5, 2022 · 2 comments · Fixed by #1585
Closed
Assignees
Labels
refactoring Refactor code without adding features

Comments

@MatthiasKillat
Copy link
Contributor

MatthiasKillat commented Jul 5, 2022

Refactoring

  1. Pass a cleanup function as function_ref instead of function (but store as function as is).
  2. Rename into ScopeGuard

cf. https://stackoverflow.com/questions/31365013/what-is-scopeguard-in-c

@MatthiasKillat MatthiasKillat added the bug Something isn't working label Jul 5, 2022
@MatthiasKillat MatthiasKillat self-assigned this Jul 5, 2022
@MatthiasKillat
Copy link
Contributor Author

Actually the cleanup function is correct on master (and a cxx function). We should still consider renaming GenericRAII to ScopeGuard.

@MatthiasKillat MatthiasKillat added refactoring Refactor code without adding features and removed bug Something isn't working labels Jul 6, 2022
@elBoberido
Copy link
Member

@MatthiasKillat yes, the ScopeGuard terminology is already used by the C++ community

mossmaurice added a commit to ApexAI/iceoryx that referenced this issue Aug 22, 2022
mossmaurice added a commit to ApexAI/iceoryx that referenced this issue Aug 22, 2022
@mossmaurice mossmaurice changed the title GenericRAII stores only a reference to cleanup function GenericRAII stores only a reference to cleanup function and renamed to ScopeGuard Aug 22, 2022
mossmaurice added a commit to ApexAI/iceoryx that referenced this issue Aug 22, 2022
mossmaurice added a commit to ApexAI/iceoryx that referenced this issue Aug 22, 2022
mossmaurice added a commit to ApexAI/iceoryx that referenced this issue Aug 22, 2022
mossmaurice added a commit to ApexAI/iceoryx that referenced this issue Aug 23, 2022
Signed-off-by: Simon Hoinkis <[email protected]>

Signed-off-by: Simon Hoinkis <[email protected]>
mossmaurice added a commit to ApexAI/iceoryx that referenced this issue Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Refactor code without adding features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants