The global operators, ::operator delete(), and ::operator delete[]() cannot be overloaded. However, you can override the default version of each of these operators with your own implementation. Only one instance of the each global delete function can exist in the program.
The user-defined operator delete must have a void return type and void* as its first argument; a second argument of type size_t is optional. A class T can define at most one version of each of T::operator delete[]() and T::operator delete(). To overload the delete operators, use the following prototypes.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|