Detected memory leaks! 발생시
예를 들어
Detected memory leaks!
Dumping objects ->
{264481} normal block at 0x03F4EB08, 580 bytes long.
Data: <$ ` > 24 00 00 00 00 00 00 00 60 00 00 00 00 00 00 00
{264480} normal block at 0x03F4E7B0, 792 bytes long.
Data: < > 09 00 0A 00 17 00 0E 00 13 00 0D 00 12 00 0F 00
이런 경우 프로그램 시작부분이나 함수가 메모리 릭이 발생 할 가능성이 있는 함수의 시작부분에
AfxSetAllocStop(264481); 씩으로 호출후 디버깅을 시작하면
그 변수가 사용되는 곳에서 디버깅이 멈춘다.
그런후 콜스택을 확인하면 메모리릭이 발생하는 곳을 찾을 수 있다.
'MFC > Error' 카테고리의 다른 글
"There is no source code available for the current location" (0) | 2015.04.22 |
---|---|
error C2146: syntax error : missing ';' before identifier 'PVOID64' (0) | 2013.01.04 |
error C2236: unexpected 'class' (0) | 2012.12.26 |