Tools to find GDI Memory Leaks

I have some code that results in leaked GDI resources. I can tell because when I run the program and view the GDI handles in Task Manager the number simply keeps rising and the program eventually crashes. I am trying to pinpoint to the problem and was wondering if there are any tools that will help me do so.

Also any advice on finding GDI memory leaks would be appreciated.
You should provide me source.
I hope that I'll help you. :)
You should only be making GDI related calls in a limited number of places, so it shouldn't be hard to track down where it's happening.

I take it you are remembering to call DeleteObject when you've finished with any pens, brushes, etc you created?

MSDN article:
Detect and Plug GDI Leaks in Your Code with Two Powerful Tools for Windows XP

(for Windows XP, but might/should still be of use...)
Last edited on
Try Deleaker or other debugger for GDI leaks.
Thanks to all! I think that problem is solved. :)
Good luck ! :)
Topic archived. No new replies allowed.