This documentation is archived and is not being maintained.

Memory Leaks and False Positives 

This topic applies to:

Visual Studio Edition

Visual Basic

C#

C++

J#

Express

No

No

Native

No

Standard

No

No

Native

No

Pro/Team

No

No

Native

No

In some cases, _CrtDumpMemoryLeaks can give false indications of memory leaks. This can occur if you use a library that marks internal allocations as _NORMAL_BLOCKs instead of _CRT_BLOCKs or _CLIENT_BLOCKs. As a result, _CrtDumpMemoryLeaks is unable to tell the difference between user allocations and internal library allocations. If the global destructors for the library allocations run after the point where you call _CrtDumpMemoryLeaks, each internal library allocation is reported as a memory leak. Previous versions of the Standard Template Library caused _CrtDumpMemoryLeaks to report such false positives, but this has been fixed in Visual Studio .NET.

See Also

Show: