Base Module VST 3.7
SDK for developing VST plug-in
|
Template definition for classes that help closing resources. More...
#include <fcleanup.h>
Public Member Functions | |
FCloser (T *_obj) | |
Constructor. More... | |
~FCloser () | |
Destructor. Calls the close function on the at construction time passed pointer. More... | |
Public Attributes | |
T * | obj |
Remembers the pointer on which close is to be called during destruction. More... | |
Template definition for classes that help closing resources.
A stack allocated object of this type automatically calls the close method of an at construction time passed object when it reaches the end of its scope. It goes without saying that the given type needs to have a close method.
Intended usage:
|
inline |
Constructor.
_obj is the pointer on which close is to be called when this FCloser object's destructor is executed.
|
inline |
Destructor. Calls the close function on the at construction time passed pointer.
T* obj |
Remembers the pointer on which close is to be called during destruction.