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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top