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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top