![]() |
MCRO
C++23 utilities for Unreal Engine.
|
Run arbitrary finalizers on destruction. It has similar purpose to ON_SCOPE_EXIT, however FFinally can be moved around into different scopes, Payload will be only executed if the finalizer hasn't been moved from, otherwise the payload will be ignored in the source of move assignments.
More...
#include <Finally.h>
Public Member Functions | |
| FFinally (TUniqueFunction< void()> &&payload) | |
| FFinally (FFinally &&from) noexcept | |
| ~FFinally () | |
Run arbitrary finalizers on destruction. It has similar purpose to ON_SCOPE_EXIT, however FFinally can be moved around into different scopes, Payload will be only executed if the finalizer hasn't been moved from, otherwise the payload will be ignored in the source of move assignments.
Usage:
Finalizers can be moved into nested scopes
|
inline |
|
inlinenoexcept |