Add this code to your applications main cpp file, before your CWinApp based class. Within your apps InitInstance(), add the following code right at the top of that function :
#ifdef _DEBUG
FindMemoryLeaks fmt;
#endif
When you stop your program on a debug run, the debug output window will detail all allocations with new / malloc, and also report where they haven't been deleted. You can double click on the line in the debug window to take you to the source with the problem (usually a 'new()' statement).
For other problems such as gdi or windows resource leaks, there are a number of tools and articles on the MSDn site you can find here : http://msdn.microsoft.com/library/de...html/leaks.asp . The gdileak.exe is excellent.
For all others leak types, take a look at Numega Bounds Checker (visit www.compuware.com and follow the evaluation links. You cannot download an eval version directly, you have to phone the company to request an eval version. They will give you one though. Another good product you can evaluate is Rational Rose Purify.
Jase
http://www.slideshowdesktop.com
View your images and photos on your desktop with ease using SlideShow Desktop, the desktop wallpaper manager for Microsoft Windows.
Last edited by jase jennings; July 22nd, 2003 at 04:37 AM.
Jase
www.slideshowdesktop.com
View your images and photos on your desktop with ease using SlideShow Desktop, the desktop wallpaper manager for Microsoft Windows....
1 point for my life story ? There's no pleasing some people
Jase
http://www.slideshowdesktop.com
View your images and photos on your desktop with ease using SlideShow Desktop, the desktop wallpaper manager for Microsoft Windows.
Jase
www.slideshowdesktop.com
View your images and photos on your desktop with ease using SlideShow Desktop, the desktop wallpaper manager for Microsoft Windows....
I'm sorry if Microsoft have broken their links since I made this post, searching for appropriate terms in the knowledge base and technical articles should find similar content.
I will attach gditest.exe to this thread when i get home later tonight, it's a very small exe. It's a useful tool, it shows you all the gdi handles in use by the system in realtime, so you can see when testing your application if they are growing out of hand due to leaks etc ...
Jase
Jase
www.slideshowdesktop.com
View your images and photos on your desktop with ease using SlideShow Desktop, the desktop wallpaper manager for Microsoft Windows....
www.slideshowdesktop.com
View your images and photos on your desktop with ease using SlideShow Desktop, the desktop wallpaper manager for Microsoft Windows....
a very good debugger to find memory leaks is BoundsChecker (now distributed by Compuware).
You can download a trial version.
After several days searching for a weird problem, I installed BC, and very soon I could locate the problem.
So, my boss was easily convinced to spend the money ;-)
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.