After running some hours my application fails in creating a new font object:
CreateFontIndirect() returns NULL.
I know how to find memory leaks (i.e. using parallel inspector or another profiler - most of them include leak detection). But how can I locate a resource leak in Win32?
Grab yourself a copy of GDI View - this useful tool can show all the GDI objects used by your app, including details on the font name, size, etc. This has proved very handy in the past.
For Win32 apps you might want to look at the WTL framework - this wraps GDI objects with lightweight C++ classes that will handle object deletion for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With