S
Steve Barnett
A question on resource usage please. I have a custom control that I paint
myself. As part of the code, I have several places where I include code
like:
canvas.FillRectangle(new SolidBrush(thisNode.EntityColor), colourType);
This fills a small rectangle using an identifying colour for the line being
displayed. There may be any number of different identifying colours.
Am I consuming resources that are likely to be leaked or held on to by using
the "new SolidBrush" construct in my control? Would I be better to create a
Brush and Dispose of it immediately after use?
Thanks
Steve
myself. As part of the code, I have several places where I include code
like:
canvas.FillRectangle(new SolidBrush(thisNode.EntityColor), colourType);
This fills a small rectangle using an identifying colour for the line being
displayed. There may be any number of different identifying colours.
Am I consuming resources that are likely to be leaked or held on to by using
the "new SolidBrush" construct in my control? Would I be better to create a
Brush and Dispose of it immediately after use?
Thanks
Steve