Base Module VST 3.7
SDK for developing VST plug-in
|
Template definition for classes that help guarding against dangling pointers. More...
#include <fcleanup.h>
Public Member Functions | |
FPtrNuller (T *&_toNull) | |
Constructor. More... | |
~FPtrNuller () | |
Destructor. Calls delete[] on the at construction time passed pointer. More... | |
Public Attributes | |
T *& | toNull |
Remembers the pointer that is to be set to NULL during destruction. More... | |
Template definition for classes that help guarding against dangling pointers.
A stack allocated object of this type automatically resets an at construction time passed pointer to null when it reaches the end of its scope.
Intended usage:
|
inline |
Constructor.
_toNull is a reference to the pointer that is to be reset to NULL when this FPtrNuller object's destructor is executed.
|
inline |
Destructor. Calls delete[] on the at construction time passed pointer.
T*& toNull |
Remembers the pointer that is to be set to NULL during destruction.