Possible Duplicate:
Any reason to overload global new and delete?
In c++ you can overload new/ delete operators, are there any benefits in doing so? Since right after calling operator new
its result value is sent to the constructor and right before calling operator delete
, the destructor is called.