网上google一下,找到了DataGrid开源项目中的一个问题:Memory leak in DataGrid when grouping?
里面解释了一下可能的原因:
It looks like in Grouping mode, the row's row.Tracker.StopTracking method is never called, because ClearContainerForItemOverride is never called by the WPF ItemsControl implementation. The result is that you just end up with an ever growing chain of ContainerTracking instances.
最后还附上一句:
Note that Microsoft has acknowledged that this is a bug, being fixed in .NET 4.0. No fix for .NET 3.5 at this time.