Q: Overload operator new/delete

J

Jakob Bieling

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,829
Latest member
PIXThurman

Latest Threads

Top