From 09830f0ea2af8066e5fec53e2871f2ee975ce958 Mon Sep 17 00:00:00 2001 From: Vladimir Enchev Date: Tue, 3 Feb 2026 07:46:32 +0200 Subject: [PATCH] DataGrid possible memory leak fixed --- Radzen.Blazor/RadzenDataGrid.razor.cs | 53 +++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/Radzen.Blazor/RadzenDataGrid.razor.cs b/Radzen.Blazor/RadzenDataGrid.razor.cs index e9329b2e..fe396d34 100644 --- a/Radzen.Blazor/RadzenDataGrid.razor.cs +++ b/Radzen.Blazor/RadzenDataGrid.razor.cs @@ -3590,6 +3590,59 @@ namespace Radzen.Blazor } } + if (expandedItems != null) + { + expandedItems.Clear(); + } + + if (editedItems != null) + { + editedItems.Clear(); + } + + if (editContexts != null) + { + editContexts.Clear(); + } + + if (childData != null) + { + childData.Clear(); + } + + if (selectedItems != null) + { + selectedItems.Clear(); + } + + if (rowSpans != null) + { + rowSpans.Clear(); + } + + if (columns != null) + { + columns.Clear(); + } + + if (allPickableColumns != null) + { + allPickableColumns.Clear(); + } + + if (allColumns != null) + { + allColumns.Clear(); + } + + if (childColumns != null) + { + childColumns.Clear(); + } + + _value = null; + Data = null; + GC.SuppressFinalize(this); }