Open 3D Engine AzQtComponents API Reference  2305.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
ScopedCleanup< F > Class Template Reference

#include <ScopedCleanup.h>

Public Member Functions

 ScopedCleanup (ScopedCleanup &&other) Q_DECL_NOEXCEPT
 
void dismiss () Q_DECL_NOEXCEPT
 

Friends

ScopedCleanup scopedCleanup (F)
 

Detailed Description

template<typename F>
class ScopedCleanup< 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>="">});


The documentation for this class was generated from the following file: