Avoiding disposing system-defined Pen and Brush instances

后端 未结 8 1979
离开以前
离开以前 2021-02-14 01:07

I understand it is best practise to call Dispose() on instances of Pen and Brush, except if they\'ve been set to the system-predefined values (eg. System.Drawing.Brushes, Syste

8条回答
  •  逝去的感伤
    2021-02-14 01:38

    Only thing come in mind is to have a practice do not use System pens/brushes as parameters to methods.

提交回复
热议问题