| HDK
    | 
#include <scoped.h>
| Public Types | |
| typedef T | Procedure | 
| The type of the function executed on destruction.  More... | |
| Public Member Functions | |
| TfScoped (const Procedure &leave) | |
| Execute leavewhen this object goes out of scope.  More... | |
| ~TfScoped () | |
Execute code on exiting scope.
A TfScoped executes code when destroyed. It's useful when cleanup code should be executed when exiting the scope because it gets executed no matter how the scope is exited (e.g. normal execution, return, exceptions, etc).