We were previously using the 2017.2.614.45 version of the Telerik controls and were facing memory leak issues with RadGridView. We have hence upgraded to 2018.3.1016.45 version of the controls but still are facing the same memory leak issues.
We use RadPane which is placed in a RadPaneGroup; the pane in turn contains the RadGridView. We have handled the closed event of the RadPaneGroup wherein we do our cleanup operations(unsubscribing RadGridView events, setting DataContext as null). As stated in one of the forum posts, we also do the cleanup operations advised which is given at the end.
Please also find the memory profile report of our application when we closed the RadPane.
9 Answers, 1 is accepted
Thank you for the provided image and code snippet. I will try to reproduce this memory leak on my side using the provided information and let you know the outcome.
Thank you for your patience.
I have tried various scenario but wasn't able to reproduce this memory leak. I think I am missing how you have set up the RadDocking and RadGridView controls. I am attaching the sample project which I used to test your case. May I ask you to take a look at this project and let me know what I am missing.
For a memory profiler, I have used JustTrace.
We use a custom DockingPanesFactory the code for which is placed below:
We use PRISM in our main window, and then views are injected dynamically. The following is the code of the RadDocking in our MainWindow:
We have custom RadPanes which are injected into the same.
Please let me know if this information suffices or any additional information is required.
Thank you for the provided code snippet. Still, I wasn't able to reproduce this memory leak. I am not exactly sure how you are adding RadGridView control inside the RadPane. Could it be possible to modify the project attached in my previous reply to demonstrate this behavior?
In addition, after a discussion, a possible memory leak could appear after the closing of the RadPane when the x:Name="" of the RadGridView is specified. Basically, declaring such name in the XAML causes that instance to be referred by the UserControl in which it is declared. Because of this static reference that the MainPage holds, the RadGridView cannot be garbage collected and is left in the memory. Can you double check on your side if such Name is set to the RadGridView and remove it?
Could you provide some memory data.
Provide two memory dumps
1. start application
2. make dump
3. Preform operations which will cause memory leak
4. make dupm
How to make dump open task manager right click on the application "create dump file"
I am not able to upload the files as the size is very large. Is there an alternate link where i can upload the same?