Override new operator in C++ while crtdbg.h is causing conflicts

后端 未结 4 409
独厮守ぢ
独厮守ぢ 2021-02-02 04:48

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

4条回答
  •  无人及你
    2021-02-02 04:56

    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.

提交回复
热议问题