CoreComponents 3.0.0
A Modern C++ Toolkit
Loading...
Searching...
No Matches
ScopeGuard Class Reference

Call cleanup function on scope exit. More...

#include <cc/ScopeGuard>

Public Member Functions

 ScopeGuard (Function< void()> &&cleanup)
 Post scope guard cleanup function.
 
 ~ScopeGuard ()
 Disband scope guard: call cleanup function.
 

Detailed Description

Call cleanup function on scope exit.

Constructor & Destructor Documentation

◆ ScopeGuard()

ScopeGuard ( Function< void()> && cleanup)

Post scope guard cleanup function.

◆ ~ScopeGuard()

~ScopeGuard ( )

Disband scope guard: call cleanup function.