I am developing a 3D game for Windows Store. I have detected memory leaks in the game but I am not able to see the file name and line number of the memory leaks in the output while debugging. The following are the lines of code that I have included to detect memory leaks:
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
_CrtDumpMemoryLeaks();
The following is the output on debugging the application:
Detected memory leaks!
Dumping objects ->
{1686} normal block at 0x06FD72E8, 8 bytes long.
Data: < > 08 F5 FE 03 00 00 00 00
{1685} normal block at 0x03FEF500, 40 bytes long.
Data: < x r > 20 E5 B4 01 78 EE FE 03 E8 72 FD 06 00 A9 03 04
{1684} normal block at 0x0403A900, 64 bytes long.
Data: <W i n d o w s . > 57 00 69 00 6E 00 64 00 6F 00 77 00 73 00 2E 00
{1676} normal block at 0x0406C858, 36 bytes long.
Data: < K > FF FF 00 00 FF EE 82 EE FF 4B 00 82 FF 00 00 FF
{1658} normal block at 0x06FD7208, 8 bytes long.
Data: < > 80 EE FE 03 00 00 00 00
{1657} normal block at 0x03FEEE78, 40 bytes long.
Data: < r J > 00 F5 FE 03 F8 F3 FE 03 08 72 FD 06 E0 4A F7 06
Whereas, according to Microsoft blogs, I should be getting the name of the file and line number when _CRTDBG_MAP_ALLOC is included in the code like the following:
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.
I am not getting the similar output (file name and line number) even after including _CRTDBG_MAP_ALLOC in the code. Please help me resolve this issue.
Thanks in advance!