In a WPF application, I have UserControls which contain XamDataGrids. I fill the grid DataSources with a List<T> of objects. The UserControls loads ok. The problem comes when the UserControl is closed/disposed. The list and the objects loaded onto the grid are NEVER released from memory. Tracking them, they are held by:
Infragistics.Windows.DataPresenter.XamDataGrid (1 instance) -> System.Windows.ResourceDictionary (1 instance) -> System.Collections.Generic.List<Windows.FrameworkElement> (1 instance) -> System.Windows.FrameworkElement[] (1 instance) -> Infragistics.Windows.DataPresenter.XamDataGrid (1 instance) -> System.Windows.EffectiveValueEntry[] (1 instance) -> List<T> (1 instance) (this is my list of objects)
Please, could anybody tell me if there is patch, a rollback or something to avoid this situation?
Thanks.
Hello,
I have been looking into your requirement and if it is possible for you, could you please send me an isolated sample project, where this issue is reproduced and steps that I need to follow to reproduce it, so I can investigate this further for you.
Looking forward for your reply.
Your controls leak memory horrible. DataPresenter especially. You need to Implement IDisposable and remove all event subscriptions and free up memory. I've tried using reflections to remove some but it's just too much. Please use IDisposable and make sure every event subscrition, property changed, etc is removed. Thank you