2010-05-01 Carlos Alberto Cortez <calberto.cortez@gmail.com>
authorCarlos Alberto Cortez <calberto.cortez@gmail.com>
Sat, 1 May 2010 08:29:21 +0000 (08:29 -0000)
committerCarlos Alberto Cortez <calberto.cortez@gmail.com>
Sat, 1 May 2010 08:29:21 +0000 (08:29 -0000)
commit5ae77d82597c9a7f1020662a6ba1ac4bb2ad01a2
treee1133563bdd5f5f2da9918f75c7d7f9180595579
parente6df6f0e020f01a03362157d05796d2e35afefc1
2010-05-01  Carlos Alberto Cortez <calberto.cortez@gmail.com>

* ToolStripItemCollection.cs: When calling Clear set Owner and Parent
properties to null for each of the items in the collection, just as
Remove/RemoveAt do. Implement a ClearInternal method that clears the
collection without modifying the mentioned properties.
* ToolStrip.cs:
* ToolStripOverflow.cs: Call ToolStripItemCollection.ClearInternal
for our internal collections.
This should fix #590100, which producing a race when the garbage
collector was calling ToolStripItem.Dispose, which in turn was firing
a Layout in the ToolStrip.

svn path=/trunk/mcs/; revision=156564
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStrip.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripItemCollection.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripOverflow.cs