I can\'t believe I\'m still confused about this but, any way, lets finally nail it:
I have a class that overrides OnPaint to do some drawing. To speed things up, I c
Although you asked about pens and brushes, Font is a class with some odd quirks. In particular, if one creates a font for the purpose of setting a control's Font property, one remains responsible for disposing of that font--ownership does not transfer to the control--but that responsibility can be carried out by disposing of the font at any time--even as soon as the font is created, before assigning it to the control. It seems Font is a combination of a managed information object and an unmanaged GDI resource, and for some purposes only the former is needed. Weird design--Font should have been two classes.