0

ALL,

I'm developing a program and compiling with MSVC 2017 Community. I am also using VLD to identify and fix memory leaks.

The problem I'm seeing is that on exit MSVC reports memory leaks, while VLD says: "No memory leaks detected".

So now I'm at a loss - who should I trust? If MSVC is right - I need a way to identify the leak in order to fix it. If I trust VLD - I will just continue moving forward.

There was a time when both did report leaks which I since fixed. But this time only one tool is reporting.

Thank you for any hints you can provide.

Igor
  • 5,620
  • 11
  • 51
  • 103
  • 1
    C++ Runtime may create its report before all destructors are called, so it thinks that some memory leaked, but actually it will be freed later. As it showed a leak, you can check whether it is a real leak, or not. Either additionally, try a profiler like Deleaker. – Artem Razin May 30 '21 at 13:44
  • @ArtemRazin, so I should trust VLD always. Good to know. Thx. – Igor May 30 '21 at 14:29

0 Answers0