Won't Fix
Last Updated: 06 Oct 2022 09:20 by ADMIN
Martin Ivanov
Created on: 07 Feb 2019 15:32
Category: Docking
Type: Bug Report
3
Docking: Memory leak after removing RadPane from RadPaneGroup
A memory leak related to the automation peers of the RadPane and RadPaneGroup appears when you close a pane (using its Close button) even if you call its RemoveFromParent() method.

To work this around disable the automation peers. To do so please set the static AutomationManager.AutomationMode property toAutomationMode.Disabled.
public MainWindow()
{
    AutomationManager.AutomationMode = AutomationMode.Disabled;
    InitializeComponent();
}

The issue originates from ItemsControlAutomationPeer. It is reported to Microsoft in their old connect portal here =>

https://connect.microsoft.com/VisualStudio/feedback/details/838165/memory-leak-in-the-itemscontrolautomationpeer-because-items-removed-from-the-itemscollection-are-still-strongly-held-by-the-weakrefelementproxystorage
1 comment
ADMIN
Vladimir Stoyanov
Posted on: 06 Oct 2022 09:20

Hello,

I investigated the scenario outlined in this item, however I was not able to reproduce the memory leak on our end. The project that I used is attached here for reference. When profiling it with a memory profiling tool (JustTrace or .NET memory profiler) I cannot observe any RadPane instances left in memory after the panes are closed. Here are the steps, which I perform on my end:

1. Start profiling the application and making sure that AutomationPeers will be created (for example by opening the Windows Virtual Keyboard).

2. Close all RadPanes in the application.

3. Force the garbage collector a few times and inspect the instances that are left via the profiling tool.

With these steps, I cannot observe RadPane objects that are not collected by the garbage collector. That is why I will proceed with closing this item.

Of course, feel free to reach out to us, if you are encountering a similar scenario and share a runnable project along with some steps, which we can follow to investigate. 

Regards,

Vladimir Stoyanov

Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Attached Files: