Memory leak with radcombobox in grid?

5 posts, 0 answers
  1. Kjell
    Kjell avatar
    275 posts
    Member since:
    Jun 2010

    Posted 16 Nov 2010 Link to this post

    Hi, I have been troubleshooting a memory leak for the past couple weeks and I have narrowed it to the comboboxes in my grid.  Usually everytime I change the pagesize on my datapager or rebind my grid, the memory usage increases.  However if I remove the combobox from my grid then I don't have the memory leak.  I took this a couple steps further and stripped down the combobox and the grid so I just have a generic combo box in my grid as the only column, I still have the leak.

    Below is the code for my grid, then outside grid I have a dropdown menu with a bunch of selections to change the pagesize on the pager.  Everytime the pagesize changes, the memory utilization goes up, it never comes down.  If I remove the combobox in the grid then I don't have this problem.

    I know a lot of memory leak issues were resolved recently so I am using the Q3 release but still have the issue.  Thanks in advance for any help or guidance.



    <telerik:RadBusyIndicator x:Name="busyIndicatorRels" BusyContent="Loading ..." Background="Transparent" BorderBrush="Transparent" Style="{StaticResource RadBusyIndicatorStyle}" >
                           <telerik:RadBusyIndicator.OverlayStyle>
                               <Style TargetType="Rectangle">
                                   <Setter Property="Fill" Value="Transparent" />
                               </Style>
                           </telerik:RadBusyIndicator.OverlayStyle>
                           <Grid x:Name="RelGrid" Visibility="Collapsed">
                               <telerik:RadGridView HorizontalAlignment="Stretch" Name="rgvRels" AutoGenerateColumns="False" RowIndicatorVisibility="Visible"
               ItemsSource="{Binding PagedSource, ElementName=radDataPagerRel}" >
                                   <telerik:RadGridView.Columns>                                    
                                       <telerik:GridViewDataColumn Header="Client" Width="160" SortMemberPath="ClientNum" 
                                                   DataMemberBinding="{Binding LearnClient}" TextAlignment="Left">
                                           <telerik:GridViewDataColumn.CellStyle>
                                               <Style TargetType="telerik:GridViewCell">
                                                   <Setter Property="Template">
                                                       <Setter.Value>
                                                           <ControlTemplate TargetType="telerik:GridViewCell">
                                                           <Border BorderBrush="DarkGray" BorderThickness="0,0,1,0" VerticalAlignment="Stretch" >
                                                               <telerik:RadComboBox x:Name="radClientCombo"                                                              
                                                                     />
                                                                 
                                                               </Border>
                                                           </ControlTemplate>
                                                       </Setter.Value>
                                                   </Setter>
                                               </Style>
                                           </telerik:GridViewDataColumn.CellStyle>
                                       </telerik:GridViewDataColumn>
                                   </telerik:RadGridView.Columns>
                               </telerik:RadGridView>
                           </Grid>
                       </telerik:RadBusyIndicator>
                       <telerik:RadDataPager Name="radDataPagerRel" PageSize="10" AutoEllipsisMode="Both" DisplayMode="All" 
                                     Margin="10,0,10,0" NumericButtonCount="10" Visibility="Collapsed"  />
  2. George
    Admin
    George avatar
    1332 posts

    Posted 22 Nov 2010 Link to this post

    Hi Kjell,

    I tried to reproduce the problem, but to no avail. Could you please specify which version of Silverlight you use?

    Best wishes,
    George
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
  3. DevCraft banner
  4. Kevin Webb
    Kevin Webb avatar
    1 posts
    Member since:
    Feb 2010

    Posted 22 Nov 2010 Link to this post

    Hi George, We are having a similar problem.  Here is what we did to reproduce as well as exaggerate to show the scope of the leak.  Take the Radcombobox binding example from the telerik demos and put about 350 extra rows into the collection of Agency objects being returned from the AgencyViewModel (in the example there are 10).  If I run this example in IE the memory usage is 43 mb upon initial load and jumps to about 163 mb when the dropdown is clicked.  In the example there are four different instances of comboboxes and they all increase the memory when dropped down.  We are using the Q3 Silverlight 4 libraries.

    Thanks for any info you can provide.
  5. Kjell
    Kjell avatar
    275 posts
    Member since:
    Jun 2010

    Posted 22 Nov 2010 Link to this post

    I am using 4.0.50917.0
  6. Pana
    Admin
    Pana avatar
    748 posts

    Posted 24 Nov 2010 Link to this post

    Hi Kjell,

    RadComboBox is not using virtualization by default. I guess you can ease the load by setting the RadComboBox to use VirtualizingStackPanel for Panel (instead of the default StackPanel). If this does not work for you please do not hesitate to contact us.

    Greetings,

    Pana
    the Telerik team

     

    Browse the videos here>> to help you get started with RadControls for Silverlight
Back to Top
DevCraft banner