disposing of SystemBrushes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

If i create a Brush object I believe it is good practice to explicitly
dispose it or use it within a using block.

Is it correct to assume that this does not apply to brushes from the
SystemBrushes collection?

Adam
 
* =?Utf-8?B?YWRhbUB0d3Yub3Jn?= said:
If i create a Brush object I believe it is good practice to explicitly
dispose it or use it within a using block.

Is it correct to assume that this does not apply to brushes from the
SystemBrushes collection?

That's correct.
 
Thank you

Does this also apply to brushes from a named color as in:

graphics.fillPoloygon(Brushes.Black, .....

Adam
 
* =?Utf-8?B?YWRhbUB0d3Yub3Jn?= said:
Does this also apply to brushes from a named color as in:

graphics.fillPoloygon(Brushes.Black, .....

Yes. You don't need to/should not dispose them.
 
Back
Top