Public Member Functions | |
ScopedCleanup (ScopedCleanup &&other) Q_DECL_NOEXCEPT | |
void | dismiss () Q_DECL_NOEXCEPT |
Friends | |
ScopedCleanup | scopedCleanup (F f) |
RAII-style class that executes a lambda when it goes out of scope. Ideal for cleanup in functions that have multiple return points.
Usage: #include <AzQtComponents/Utilities/ScopedCleanup.h> (...) auto cleanup = scopedCleanup([]{ <my cleanup that should be executed at end of scope>});