How to detect memory leak when memory allocation number isn't always same?
问题 I got a memory leak (55 bytes) on my program like this. I am using C++, MFC, Visual Studio 2010. Detected memory leaks! {13497} normal block at 0x0E44C248, 55 bytes long. Data: 44 3A 5C 46 44 41 53.... the problem is, the memory allocation number "13497" is not always same. it's always different number if I run the program again. I wanted to find where I didn't release the memory before the exit, with _crtBreakAlloc, but it seems not possible to break on a memory allocation number. I used