![]() |
Default C++ deletion policy class.The DefaultDelete deletion policy is the standard delete for resources allocated via the new operator. It uses delete or array delete (depending on the template argument) to free the resource: More...
#include <DefaultDelete.h>
Public Member Functions | |
Utility functions | |
void | operator() (Type *ptr) const |
Implementation of the default delete policy. More... | |
Default C++ deletion policy class.
The DefaultDelete deletion policy is the standard delete for resources allocated via the new operator. It uses delete or array delete (depending on the template argument) to free the resource:
Note the explicit use of empty array bounds to configure DefaultDelete to use array delete instead of delete. Also note that the delete operation is NOT permitted for incomplete types (i.e. declared but undefined data types). The attempt to apply a DefaultDelete functor to a pointer or array to an object of incomplete type results in a compile time error!
|
inline |
Implementation of the default delete policy.
ptr | The pointer to delete. |
This function frees the given pointer resource via delete. Note that the delete operation is NOT permitted for incomplete types (i.e. declared but undefined data types). The attempt to use this function for a pointer to an object of incomplete type results in a compile time error!