GDI+ Deleting Pens?

I am a bit confused by something I read on MSDN:

http://msdn.microsoft.com/en-us/library/ms533895%28v=VS.85%29.aspx

On this article, I do not see anything like "delete pen" after the pen is no longer needed. I know in GDI you have to use DeleteObject so that dead pen's and brushes do not pile up, but this article leads me to believe that in GDI+ you do not have to.

Is MSDN right? Or should I be using "delete pen/brush/etc"?
I don't program much with GDI+ or GDI for that matter, so I am not 100% sure on this one. However, being GDI+ a set of C++ classes, I can only imagine that the pen's resources are cleaned up during the object's destruction.
Ah, I had completely forgot about the object's destructor. Thanks for pointing that out. It just confused me after reading about just regular GDI.
Topic archived. No new replies allowed.