Greetings:

I've always been a bit puzzled about the business of creating and destroying GDI objects like pens and brushes and bitmaps. Some examples I have seen create GDI objects but do not appear to delete them. Others do.

I was wondering if there was some mechanism under Visual Studio whereby you can monitor the number of GDI resources your app has allocated and check to see if you are tidying up properly before leaving certain procedures. Something similar to the way in which VS can tell you if you have a memory leak.

Thank you,
Mark