Can anyone recommend a quality API for debugging C ++ memory or software for Windows (specifically the one that works with MinGW)? I am pretty sure that my program has a memory leak, but I don’t know where to start.
In addition, in a related note, I previously tried to overload global new ones and delete statements myself and store debug information from there. However, when I try to replace every new occurrence with my overloaded operator, it throws a bunch of errors. For this, I was just trying to use a simple preprocessor macro.
#define new new(__FILE__, __LINE__)
Is there any special way to solve this problem?
EDIT: I probably should have been more clear with that. I really declared the overload and implemented it without any errors. The only problem was that I tried to use the macro to replace all uses of the new operator, to use my overload instead, so I just posted the macro code.
source
share