I'm currently in debuging some code, removing or at least locating memory leaks using Visual Studio 2012 with CrtDbg.
The problem is, as long as the allocation number does not change, tracking down the allocation is rather easy. When the allocation number changes a lot (or is not really deterministic), how can I locate the allocation point of that leak? Can I a least say, which module was allocating the memory?
I have following lines on shutdown of the application:
Detected memory leaks!
Dumping objects ->
{2789444} normal block at 0x0000000006103CB0, 32 bytes long.
Data: < q f > B8 71 E4 66 00 00 00 00 00 00 00 00 00 00 00 00
{1269709} normal block at 0x000000000A50C6A0, 1008 bytes long.
Data: < ) > 01 00 00 00 0B 00 00 00 29 00 00 00 CD CD CD CD
...
{2194} normal block at 0x0000000000278060, 16 bytes long.
Data: < > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Object dump complete.
The last allocation number, 2194, is reproducable and is related to a static initializer. But the other numbers are changing.
Can't I use the address to locate it? Or is there a simpler solution to it?
Help would be great.