Visual Studio _CrtDumpMemoryLeaks

CRT, Microsoft Visual Studio: " - ". .

Microsoft (http://msdn.microsoft.com/en-us/library/e5ewb1h3(VS.80).aspx).

stdafx.h ( ):

#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>

:

_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );

, Microsoft:

Detected memory leaks!
Dumping objects ->
C:\PROGRAM FILES\VISUAL STUDIO\MyProjects\leaktest\leaktest.cpp(20) : {18} 
normal block at 0x00780E80, 64 bytes long.
 Data: <                > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD
Object dump complete.

, , , - ( _CRTDBG_MAP_ALLOC):

Detected memory leaks!
Dumping objects ->
{18} normal block at 0x00780E80, 64 bytes long.
 Data: <                > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD
Object dump complete.

, , CRT . , , ( ).

,

+3
3

, MSVC, ( ) C (.. MSVCRTxx.xxx). " ", , -.

+1

Visual Leak Detector / _CrtDumpMemoryLeaks. VLD ( ), .

+2

, new, __FILE__ __LINE__. new, __FILE__ __LINE__ CRT, . .

+1

All Articles