Hi List,
I am overloading new and delete globally for memory leak detection.
void* operator new(std::size_t s, const char * file , int inLine) ;
->case1
void* operator new[](std::size_t s, const char * file , int inLine);
->case 2
I implement the above two functions using malloc. Now to replace all
occurances of
standard new with my above new operator I use the below macro.
#define DEBUG_NEW new(__FILE__, __LINE__)
#define new DEBUG_NEW
This works for first case.
My question is can I define a Macro in a similar way for second case
also?
if so, how?
if not, any work around to replace all occurances of operator new[]
with my operator?
---
Thanks,
Yogesh Kini
I am overloading new and delete globally for memory leak detection.
void* operator new(std::size_t s, const char * file , int inLine) ;
->case1
void* operator new[](std::size_t s, const char * file , int inLine);
->case 2
I implement the above two functions using malloc. Now to replace all
occurances of
standard new with my above new operator I use the below macro.
#define DEBUG_NEW new(__FILE__, __LINE__)
#define new DEBUG_NEW
This works for first case.
My question is can I define a Macro in a similar way for second case
also?
if so, how?
if not, any work around to replace all occurances of operator new[]
with my operator?
---
Thanks,
Yogesh Kini
Comment