From the crtdbg.h. Is this due to the wrong ordering of the headers in the stdafx.h, or is this normal?
Perhaps this article can help you. Notice this part :
For the CRT functions to work correctly, the #include statements must follow the order shown here.
You could use Visual Leak Detector for finding leaks involved with missing delete
for new
operator as others mentioned. I had good experience with it, but I usually tend to triple-check if in my code every new
has corresponding delete
call.
Also, am I on the right track for detecting memory leaks in Win32 apps or is there something else I should be using in Visual Studio?
The other type of memory leaks are GDI leaks
. These usually happen when you do not restore the device context
into original state or you forget to delete the GDI object
.
For those leaks I use GDIView. Its usage is well described but if you have any questions leave a comment.
You might find this article useful.
Of course, there are lots of good tools out there, this is just my suggestion.
Hopefully this helps.
Best regards.