Quantcast
Channel: Visual Leak Detector for Visual C++ 2008-2015
Viewing all articles
Browse latest Browse all 704

Commented Unassigned: Wrong detection with /MT compiler switch [10583]

$
0
0
```
#define VLD_FORCE_ENABLE
#include <vld.h>

int main()
{
return 0;
}
```

build the above code with __/MT__ option(__static release CRT__). press F5 and get a lot of leaks
Comments: If you are building a using a Debug configuration you should be using /MTd (Debug), NOT /MT option. VLD is intended to be included in a debug build, by using /MT you're going to get memory leaks because you've compiled with release CRT whilst VLD will still be using debug CRT.

Viewing all articles
Browse latest Browse all 704

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>