OXY API 1.0
OXY API Library Documentation
Loading...
Searching...
No Matches
oxy::scope_exit Struct Reference

A utility for executing a function upon exiting a scope. More...

#include <scope_exit.hpp>

Public Member Functions

 scope_exit (std::function< void(void)> f)

Detailed Description

A utility for executing a function upon exiting a scope.

The scope_exit struct allows you to specify a function that will be executed when the scope in which the scope_exit object is created is exited, either normally or due to an exception. This is useful for ensuring that resources are properly released or cleanup actions are performed, regardless of how the scope is exited.