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

Add scoped_cleanup helper #3968

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

reneme
Copy link
Collaborator

@reneme reneme commented Apr 4, 2024

Use this to ensure that some cleanup callback is invoked whenever control-flow leaves a certain enclosing scope. Note that one can use disengage() on the resulting RAII object to (selectively) prevent the cleanup callback to be called.

The helper isn't used anywhere in the code base so far.

@reneme reneme added the enhancement Enhancement or new feature label Apr 4, 2024
@reneme reneme requested a review from randombit April 4, 2024 13:47
@reneme reneme self-assigned this Apr 4, 2024
@reneme reneme merged commit b059347 into randombit:master Apr 4, 2024
42 checks passed
@reneme reneme deleted the feature/scoped_cleanup branch April 4, 2024 17:34
@coveralls
Copy link

Coverage Status

coverage: 92.08% (+0.004%) from 92.076%
when pulling b6e216d on Rohde-Schwarz:feature/scoped_cleanup
into e9c6c16 on randombit:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement or new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants