Q: Overload operator new/delete

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jakob Bieling

    Q: Overload operator new/delete

    Hi,

    I am overloading the global operator new and delete to track allocations
    and find leaks, along with file name and line numbers. This is how I
    overloaded operator new:

    #define new new (__FILE__, __LINE__)

    Now the same will not work with operator delete. Is there a way to have
    the file name and line number passed to operator delete?

    Thanks
    --
    jb

    (replace y with x if you want to reply by e-mail)


Working...