Hey folks. I'm fine-tuning an in-house memory debugging utility, and I'm
curious if it's possible to override the global operators new() and
delete()?
MSL_C++ Ref says:
17.4.3.4 Replacement Functions
If replacement definition occurs prior to program startup replacement
functions are allowed. A C++ program may provide the definition for any of
eight dynamic memory allocation function signatures declared in header
<new>.
operator new(size_t)
operator delete(void*)
Stroustrup says, in 15.6, "However, replacing the global operator new() and
operator delete() is not for the fainthearted." He then gives examples of
how to do it for a particular class. I need to wrap the global new and
delete operators, so his examples on doing it for a particular class are of
no help.
How can I wrap the global new and delete operators that your average C++ CW6
program utilize? Trapping the resulting MemPtrNew is not an option.
Thanks.
-Jeff Ishaq
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/