Won't Fix
Last Updated: 14 Nov 2023 15:58 by ADMIN
ADMIN
Petar Mladenov
Created on: 13 Jul 2018 13:51
Category: GridView
Type: Bug Report
1
GridView: Reset operation done by Clear or RemoveRange cause a memory leak of GridViewRow instances

Reset by Clear, RemoveRange causes a memory leak of GridViewRow instances (or TreeListViewRow in RadTreeListView).

To work this around, you can call the Clear method of the RadGridView's Items collection and then reset the ItemsSource property.

this.radGridView.Items.Clear();
this.radGridView.ItemsSource = null;
this.radGridView.ItemsSource = newSource;
Edit: The number of instances of the GridViewRow class are relative to the number of containers which cover the visible viewport. They are kep by internal caching mechanism used for faster reuse of containers is data-reload scenarios. Containers are dettached from their previous viewmodels (DataContext).

In non virtualized scenario, the number of the live containers is the same as the number of items in the GridView's ItemsSource and when changing the source, the number remains the same as the items in the source.

We are closing this issue as we think the mentioned internal cache shouldn't be considered a memory problem but rather a powerful performance optimization internal tool for extensive data-refresh scenarios.
0 comments