How can I automatically detect memory leaks in C++ in a portable way? I am looking for some sort of templating solution where I can just use a macro like NEW or DELETE to track creation and deletion. It has to work on Mac, Linux, and Windows.
Share
There are a lot of tools available for that. E.g special libraries like dmalloc libraries like libfence. On Linux especially Valgrind is very useful.
so the best “bet” probably is that you get some malloc debug libraries source code and use it in all your developments.