Guard to release resources safely.
More...
#include <arch0arch.h>
Guard to release resources safely.
◆ Arch_scope_guard()
Arch_scope_guard::Arch_scope_guard |
( |
std::function< void()> |
function | ) |
|
|
inline |
Attach a function to the guard which releases some resource.
◆ ~Arch_scope_guard()
Arch_scope_guard::~Arch_scope_guard |
( |
| ) |
|
|
inline |
Release the resources automatically at the time of destruction.
◆ cleanup()
void Arch_scope_guard::cleanup |
( |
void |
| ) |
|
|
inline |
Manually release the resource.
◆ m_cleanup
std::function<void()> Arch_scope_guard::m_cleanup {} |
|
private |
Function to release the resource.
The documentation for this class was generated from the following file: