detect memory leak
-
Plenty of answers here: http://www.codeproject.com/search.aspx?q=memory+leaks&x=0&y=0&sbo=kw[^] A good practice is to use a lot of ASSERT and VERIFY to check that you are cleaning up your pointers and objects correctly, but that's not sufficient. You may also use commercial applications : boundschecker[^] for instance How big is your project ?
-
If all else fails, you can use the Signal Flare debugging pattern: Increase the size of your allocations (one at a time) by ten, and rerun your program. When the memory leak increases by ten, you've found the problem.
-
You can also make use of CLR Profiler tool to find the memory leak. There is a very good article at http://msdn.microsoft.com/en-us/magazine/cc163528.aspx[^] about the memory leak.
I quit being afraid when my first venture failed and the sky didn't fall down.
-
Check out _CrtDumpMemoryLeaks[^]: Finding Memory Leaks Using the CRT Library[^] -House of Blues