iceoryx icon indicating copy to clipboard operation
iceoryx copied to clipboard

GenericRAII stores only a reference to cleanup function

Open MatthiasKillat opened this issue 2 years ago • 2 comments

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 avatar Jul 05 '22 13:07 MatthiasKillat

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

MatthiasKillat avatar Jul 06 '22 08:07 MatthiasKillat

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

elBoberido avatar Jul 06 '22 09:07 elBoberido