I would like to use Electric Fence in an MFC application. I would like to track new
/ delete
, and if I can track malloc
/ free
, then the added bonus.
Unfortunately, MFC overrides new
and delete
- but uses macros (DEBUG_NEW) - so I cannot use the standard C ++ method to override them. (MFC defines them to have different signatures, with source files and line numbers as additional parameters).
Is there a way to get all new
/ delete
to go through my allocator and stop MFC trying to capture these allocators?
source share