I have tracked this down in reflector and SOS (Son of Strike) and know what
is going on but wanted an explanation. Copy this code into a windows forms
app and enable the timer with a Interval set to 10.
public partial class Form1 : Form
{
SolidBrush _brush;
public Form1()
{
InitializeComponent();
_brush = new SolidBrush(Color.Red);
}
private void timer1_Tick(object sender, EventArgs e)
{
_brush.Color = Color.Blue;
_brush.Color = SystemColors.Control;
}
}
I see lots of 16 byte WeakReference objects not being released. They are
being kept around by the static WeakReference array that is used inside of
the SolidBrush.Color property set (SystemColorTracker). What is the deal?
Brock