Normally when I override the OnPaint method, I create pens and brushes, etc inside it and then dispose them.
I also read somewhere that instead of recreating these pens and brushes, etc to create them once as static members, and then dispose them once when the form is closed, etc.
Is this a better practice?
Is there a better way for this?
I can assume that since OnPaint is called 1000s (?) of times, that would create a lot of work for the GC compared to creating them only once.