Navigation
API > API/Runtime > API/Runtime/Core
Not meant for direct consumption : use ON_SCOPE_EXIT instead.
RAII class that calls a lambda when it is destroyed.
| Name | TScopeGuard |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Misc/ScopeExit.h |
| Include Path | #include "Misc/ScopeExit.h" |
Syntax
template<typename FuncType>
class TScopeGuard
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TScopeGuard
(
TScopeGuard&& |
Misc/ScopeExit.h | ||
TScopeGuard
(
const TScopeGuard& |
Misc/ScopeExit.h | ||
TScopeGuard
(
FuncType&& InFunc |
Given a lambda, constructs an RAII scope guard. | Misc/ScopeExit.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~TScopeGuard() |
Causes the lambda to be executed. | Misc/ScopeExit.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Func | FuncType | The lambda to be executed when this guard goes out of scope. | Misc/ScopeExit.h |
Functions
Public
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TScopeGuard & operator=
(
TScopeGuard&& |
Misc/ScopeExit.h | ||
TScopeGuard & operator=
(
const TScopeGuard& |
Misc/ScopeExit.h |