Class that allows a function to be run when this object goes out of scope.
The function to run when the ScopeHelper goes out of scope.
Whether the scope function has been canceled or not.
ScopeHelper( |
| ) |
Creates a ScopeHelper object.
scopeFunction std::function<void()> | The function to run when the ScopeHelper object is destroyed. |
Runs whatever function was assigned in the creation of the ScopeHelper.
Sets a flag that indicates the originally set function should NOT be run when the ScopeHelper is destroyed.