Is it important to dispose SolidBrush and Pen?

后端 未结 6 875
别跟我提以往
别跟我提以往 2021-01-04 00:55

I recently came across this VerticalLabel control on CodeProject.

I notice that the OnPaint method creates but doesn\'t dispose Pen and SolidBrush objects.

D

6条回答
  •  长发绾君心
    2021-01-04 01:30

    in addition i would tell that is preferable to use the ready collections: System.Drawing.Pens. and System.Drawing.Brushes. if you not customize them in a special way.

提交回复
热议问题