While trying out some memory tracking and preparation for my own memory manager, I tried to override the new operator. The article on flipcode was my main guideline in this proc
In one application of ours we resorted to renaming everywhere at the application level new
with xnew
and then defining the debug macro as acting only on xnew
.
Using new
and redefining it as a macro can have problems also with custom allocators. Unfortunately C++ syntax for allocation made debugging wrappers harder to do.