area-controls-DataGridViewhelp wantedtenet-performance
仓库指标
- Star
- (4,100 star)
- PR 合并指标
- (平均合并 14天 22小时) (30 天内合并 56 个 PR)
描述
-
.NET Core Version: all up to 7.0 p2
-
Have you experienced this same bug with .NET Framework?: Yes
Problem description:
As I mentioned in https://github.com/dotnet/winforms/issues/6858 DataGridView not dispose old data on DataSource change. This is lead to 2 problems:
- All this stuff are going to finalization query because we have unnecessary finalizer here #6858.
- If we have a
ContextMenuStripbound to Cell/Column/Row we will have a memory leak.DataGridViewwith 3 columns andContextMenuStripbound to 1000 rows, result of DS refresh:
Expected behavior:
Old data must be property disposed. Probably in DataGridView.RefreshColumnsAndRows() (in DataGridView.Methods.cs)
Minimal repro: DataGridViewLeak.zip