I am using 2017.1.117.40
Here is the scenario:
1. Create 6 RadPanes using MVVM - TestListView, TestPropertyView, TestRestulView, TestGraphView, TestActionView & CorrelationMeasurementView
2. Only TestListView, TestResultView are visible when RadDocking is loaded while the rest are not.
3. Click on a Dispose button. All RadPanes are visually removed from RadDocking.
4. Make a memory profile using dotMemory.
5. TestListView, TestResultView & TestPropertyView are properly disposed. While TestActionView, TestGraphView & CorrelationMeasurementView (all with R adGridView defined) are still being retained in the memory.
6. When remove RadGridView reference from TestListView, then run through the same step to dispose RadDocking & RadPanes, TestActionView is properly disposed from the memory.
7. Another test is to select TestActionView once after RadDocking has loaded. Then click Dispose button. TestActionView can be properly disposed.
p/s: sorry, i can't provide any sample project at this moment for you to reproduce the problem.
8 Answers, 1 is accepted
<!-- ActionItem Records --><telerik:RadGridView Grid.Row="0" Margin="4" GroupRenderMode="Flat" ShowGroupPanel="False" ItemsSource="{Binding SelectedTestActionTable, Mode=OneWay}" RowIndicatorVisibility="Collapsed" CanUserFreezeColumns="False" AutoGenerateColumns="False" IsReadOnly="True" CanUserReorderColumns ="False" CanUserInsertRows="False" CanUserDeleteRows="False"> <telerik:RadGridView.Columns> <telerik:GridViewDataColumn DataMemberBinding="{Binding TestLongName}" Header="Test Long Name"/> <telerik:GridViewDataColumn DataMemberBinding="{Binding CustomTestName}" Header="Custom Test Name"/> <telerik:GridViewDataColumn DataMemberBinding="{Binding UoM}" Header="Unit"/> <telerik:GridViewDataColumn DataMemberBinding="{Binding TestResult}" Header="Test Result" CellStyleSelector="{StaticResource myStyle}"/> <telerik:GridViewDataColumn DataMemberBinding="{Binding TestItemAlgoTime}" Header="Test Item Algo Time (ms)"/> <telerik:GridViewDataColumn DataMemberBinding="{Binding Status}" Header="Status"/> </telerik:RadGridView.Columns></telerik:RadGridView><!-- Test Statistic Table --><telerik:RadGridView Grid.Row="2" Margin="4" GroupRenderMode="Flat" ShowGroupPanel="False" RowIndicatorVisibility="Collapsed" CanUserFreezeColumns="False" ItemsSource="{Binding TestStatisticTable, Mode=OneWay}" AutoGenerateColumns="True" IsReadOnly="True" CanUserReorderColumns ="False" CanUserInsertRows="False" CanUserDeleteRows="False"/>I looked through the given files, but I cannot to surely relate the observed leak to a known memory issue. However, I noticed that the view that displays path to GC.Root contains an instance of Timer as a retainer for RadGridView. Can you please confirm whether you have any custom timers in your application logic. Additionally, there are few timers that are used in RadGridView's logic. Two of them are enabled by default: one is related to text search and the other to property changed aggregation. Can you please try setting CanUserSearch and IsPropertyChangedAggregationEnabled to false and check whether there is any change in the memory footprint?
Regards,
Ivan Ivanov
Progress Telerik
Hi,
Unfortunately the retention is still there when i set CanUserSearch and IsPropertyChangedAggregationEnabled to false for all RadGridView.
I have attached the TimeQueue Creation Stack snapshot. Please have a look.
Allow me to reiterate, with the RadPanes brought into view, the disposal is working perfectly. But when they were not brought into view, their instances were retained in the memory.
<telerik:RadDocking x:Name="radDockTestPanel" AllowDragReorder="True" Grid.Row="1" HasDocumentHost="False" telerik:RadDocking.SerializationTag="layoutXml" PanesSource="{Binding TestPanelCollection, Mode=OneWay}"> <i:Interaction.Triggers> <i:EventTrigger EventName="Loaded"> <cal:ActionMessage MethodName="LoadLayout"> <cal:Parameter Value="{Binding ElementName=radDockTestPanel}"/> </cal:ActionMessage> </i:EventTrigger> <i:EventTrigger EventName="PaneStateChange"> <cal:ActionMessage MethodName="PaneStateChange"> <cal:Parameter Value="$eventArgs"/> </cal:ActionMessage> </i:EventTrigger> </i:Interaction.Triggers> <telerik:RadDocking.DockingPanesFactory> <behavior:CustomDockingPanesFactory/> </telerik:RadDocking.DockingPanesFactory> <telerik:RadSplitContainer InitialPosition="DockedLeft" telerik:RadDocking.SerializationTag="leftSplitter"> <telerik:RadPaneGroup telerik:RadDocking.SerializationTag="leftGroup" Tag="leftGroup"/> </telerik:RadSplitContainer> <telerik:RadSplitContainer InitialPosition="DockedTop" telerik:RadDocking.SerializationTag="topSplitter"> <telerik:RadPaneGroup telerik:RadDocking.SerializationTag="topGroup" Tag="topGroup"/> </telerik:RadSplitContainer> <telerik:RadSplitContainer InitialPosition="DockedRight" telerik:RadDocking.SerializationTag="rightSplitter"> <telerik:RadPaneGroup telerik:RadDocking.SerializationTag="rightGroup" Tag="rightGroup"/> </telerik:RadSplitContainer> <telerik:RadSplitContainer InitialPosition="DockedBottom" telerik:RadDocking.SerializationTag="bottomSplitter"> <telerik:RadPaneGroup telerik:RadDocking.SerializationTag="bottomGroup" Tag="bottomGroup"/> </telerik:RadSplitContainer></telerik:RadDocking>
Here is the RadDocking layout xml file:
<?xml version="1.0" encoding="utf-8"?><RadDocking SerializationTag="layoutXml"> <SplitContainers> <RadSplitContainer Dock="DockedLeft" SerializationTag="leftSplitter" Width="280" Orientation="Vertical"> <Items> <RadPaneGroup SerializationTag="leftGroup" SelectedIndex="0"> <Items> <RadPane SerializationTag="Test List" IsDockable="True" Header="Test List" CanUserClose="False" /> </Items> </RadPaneGroup> <RadPaneGroup SerializationTag="leftGroup"> <Items> <RadPane SerializationTag="Test Properties" IsDockable="True" Header="Test Properties" CanUserClose="False" /> </Items> </RadPaneGroup> </Items> </RadSplitContainer> <RadSplitContainer Dock="DockedTop" SerializationTag="topSplitter" > <Items> <RadPaneGroup SerializationTag="topGroup" SelectedIndex="0"> <Items> <RadPane SerializationTag="Test Result" IsDockable="True" Header="Test Result" CanUserClose="False" /> <RadPane SerializationTag="Test Graph" IsDockable="True" Header="Test Graph" CanUserClose="False" /> <RadPane SerializationTag="Test Action" IsDockable="True" Header="Test Action" CanUserClose="False" /> <RadPane SerializationTag="Correlation Measurement" IsDockable="True" Header="Correlation Measurement" CanUserClose="False" /> </Items> </RadPaneGroup> </Items> </RadSplitContainer> </SplitContainers></RadDocking>
I have submitted a support ticket ID: 1147984
Please have a look.
I just dropped a line in the support ticket. Please, let us continue our communication there. Eventually, I will share the resolution here so that the community can benefit.
Regards,
Ivan Ivanov
Progress Telerik