struct ScopeGuard

Inherits: INonCopyable

Executes a function when the object goes out of scope.

Public

Constructors

ScopeGuard

ScopeGuard(const Function<void ()> &callback)

ScopeGuard

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

Methods

~ScopeGuard

~ScopeGuard() noexcept

Private

Fields

Callback

Function<void ()> Callback