2012年9月5日 星期三

How to detect memory leak

1. Use tool like UMDH to find the leak in new,delete,malloc,etc;
2. Check the code with "VirtualAlloc, HeapAlloc, etc";
3. Check for memory mapping file.

2012年8月29日 星期三

About UMDH

1. Need to set \MD option in Dll project. I have tested If use \MT in a dll, UMDH can't find the leak;
2. If a dll was loaded dynamically, make sure It'is not unloaded while inputting "umdh -p:**** -f:***.txt"; otherwise we can't see the source code.
3. set \DEBUG option to generate PDB file.
4. For COM component may need load it statically.