Memory slowly climbs between navigation

2 posts, 0 answers
  1. John Morris
    John Morris avatar
    28 posts
    Member since:
    Aug 2009

    Posted 23 Sep 2009 Link to this post

    Is there a best practice for disposing of a previous RadPage and its resources when using Navigate()?  I have two pages, one with a grid (page 1), the other with a radnumericupdown (page 2).  As I navigate from page 1 to page 2, the memory stays the same but going back to page 1, it increases.    I've tried setting the grid's itemsource to null and actually setting the RadPage to null after calling Navigate().  Both seemed to help a little but it still increases each time.


    more info... After running the following code from page 1:

    service.Navigate(new page 2());
    RadPage currentPage = this as RadPage;
    currentPage = null;

    I still have the page 1 grid in the heap and WinDb's  !gcroot reveals:

    0:028> !gcroot 093b03a0
    Note: Roots found on stacks may be false positives. Run "!help gcroot" for
    more info.
    Scan Thread 5 OSTHread 1780
    Scan Thread 24 OSTHread fc0
    Scan Thread 25 OSTHread 166c
    Scan Thread 8 OSTHread e8c
    Scan Thread 17 OSTHread 1068
    Scan Thread 26 OSTHread 1620
    Scan Thread 27 OSTHread 1618
    DOMAIN(068438B8):HANDLE(Strong):2731104:Root:  093af99c(System.Windows.Style)->
      093af9e0(System.Collections.Generic.Dictionary`2[[System.Windows.DependencyObject, System.Windows],[System.Object, mscorlib]])->
      093afa28(System.Collections.Generic.Dictionary`2+Entry[[System.Windows.DependencyObject, System.Windows],[System.Object, mscorlib]][])->
      093af944(System.Windows.SetterBaseCollection)->
      093afa64(System.Collections.Generic.Dictionary`2[[System.Windows.DependencyObject, System.Windows],[System.Object, mscorlib]])->
      093afaac(System.Collections.Generic.Dictionary`2+Entry[[System.Windows.DependencyObject, System.Windows],[System.Object, mscorlib]][])->
      093af7f8(System.Windows.Setter)->
      093af83c(System.Collections.Generic.Dictionary`2[[System.Windows.DependencyObject, System.Windows],[System.Object, mscorlib]])->
      093af884(System.Collections.Generic.Dictionary`2+Entry[[System.Windows.DependencyObject, System.Windows],[System.Object, mscorlib]][])->
      093af8c0(System.Collections.Generic.Dictionary`2[[System.UInt32, mscorlib],[System.Windows.DependencyObject, System.Windows]])->
      093af908(System.Collections.Generic.Dictionary`2+Entry[[System.UInt32, mscorlib],[System.Windows.DependencyObject, System.Windows]][])->
      093af758(System.Windows.Controls.ControlTemplate)->
      093af0e4(NBA5.Reports)->
      093b03a0(Telerik.Windows.Controls.RadGridView)->
    DOMAIN(068438B8):HANDLE(Strong):273118c:Root:  093af5a0(System.Windows.ResourceDictionary)->
      093af0e4(NBA5.Reports)->
      093b03a0(Telerik.Windows.Controls.RadGridView)->
    DOMAIN(068438B8):HANDLE(Strong):27311a4:Root:  0940ebec(System.Windows.Controls.Button)->
      0940f830(System.Windows.RoutedEventHandler)->
      093ec050(Telerik.Windows.Controls.GridView.FilteringDropDown)->
      093b03a0(Telerik.Windows.Controls.RadGridView)->
    DOMAIN(068438B8):HANDLE(Strong):27311c8:Root:  093b2dbc(Telerik.Windows.Controls.RadComboBoxItem)->
      093b1d64(Telerik.Windows.Controls.RadComboBox)->
      093b3bdc(System.Windows.Controls.StackPanel)->
      093b1c78(System.Windows.Controls.Grid)->
      093b1cd0(System.Collections.Generic.Dictionary`2[[System.Windows.DependencyObject, System.Windows],[System.Object, mscorlib]])->
      093b1d18(System.Collections.Generic.Dictionary`2+Entry[[System.Windows.DependencyObject, System.Windows],[System.Object, mscorlib]][])->
      093b03a0(Telerik.Windows.Controls.RadGridView)->
    DOMAIN(068438B8):HANDLE(Strong):27311d0:Root:  0940ee68(MS.Internal.ManagedObjectReference)->
      0940ebec(System.Windows.Controls.Button)->
      0940f830(System.Windows.RoutedEventHandler)->
      093ec050(Telerik.Windows.Controls.GridView.FilteringDropDown)->
      093b03a0(Telerik.Windows.Controls.RadGridView)->
    DOMAIN(068438B8):HANDLE(Strong):27311e8:Root:  095b1c3c(System.Windows.Controls.ContentPresenter)->
      095b1be4(System.Windows.Controls.Grid)->
      095b04b0(System.Windows.Controls.Button)->
      095b0724(System.Windows.RoutedEventHandler)->
      093af0e4(NBA5.Reports)->
      093b03a0(Telerik.Windows.Controls.RadGridView)->
    DOMAIN(068438B8):HANDLE(Pinned):273122c:Root:  093b2eb0(MS.Internal.ManagedObjectReference)->
      093b2dbc(Telerik.Windows.Controls.RadComboBoxItem)->
      093b1d64(Telerik.Windows.Controls.RadComboBox)->
      093b3bdc(System.Windows.Controls.StackPanel)->
      093b1c78(System.Windows.Controls.Grid)->
      093b1cd0(System.Collections.Generic.Dictionary`2[[System.Windows.DependencyObject, System.Windows],[System.Object, mscorlib]])->
      093b1d18(System.Collections.Generic.Dictionary`2+Entry[[System.Windows.DependencyObject, System.Windows],[System.Object, mscorlib]][])->
      093b03a0(Telerik.Windows.Controls.RadGridView)->
    DOMAIN(068438B8):HANDLE(Pinned):2731268:Root:  095b1be4(System.Windows.Controls.Grid)->
      095b04b0(System.Windows.Controls.Button)->
      095b0724(System.Windows.RoutedEventHandler)->
      093af0e4(NBA5.Reports)->
      093b03a0(Telerik.Windows.Controls.RadGridView)->
    DOMAIN(068438B8):HANDLE(Pinned):273127c:Root:  093b0638(Telerik.Windows.Controls.RowAppearanceSettings)->
      093b03a0(Telerik.Windows.Controls.RadGridView)->
    DOMAIN(068438B8):HANDLE(Pinned):2731298:Root:  093b0728(System.EventHandler)->
      093b0714(Telerik.Windows.Controls.GridView.UnloadedEvent)->
      093b03a0(Telerik.Windows.Controls.RadGridView)->
    DOMAIN(068438B8):HANDLE(Pinned):27312b8:Root:  093b082c(MS.Internal.ManagedObjectReference)->
      093b03a0(Telerik.Windows.Controls.RadGridView)->
    DOMAIN(068438B8):HANDLE(Pinned):27312e8:Root:  093b0908(Telerik.Windows.Controls.GridViewTableDefinition)->
      093b03a0(Telerik.Windows.Controls.RadGridView)->
    DOMAIN(068438B8):HANDLE(Strong):2731410:Root:  0940c2d8(System.Windows.Controls.StackPanel)->
      0940c460(System.Collections.Generic.Dictionary`2[[System.Windows.DependencyObject, System.Windows],[System.Object, mscorlib]])->
      0940eab0(System.Collections.Generic.Dictionary`2+Entry[[System.Windows.DependencyObject, System.Windows],[System.Object, mscorlib]][])->
      0940e704(System.Windows.Controls.TextBox)->
      0940e8cc(System.Windows.DataContextChangedEventHandler)->
      0940e860(System.Windows.Data.BindingExpression)->
      0940fafc(Telerik.Windows.Data.FieldFilterDescription)->
      0940fbb4(Telerik.Windows.Data.RadObservableCollection`1[[Telerik.Windows.Data.FilterDescriptor, Telerik.Windows.Data]])->
      0940fd10(System.Collections.Specialized.NotifyCollectionChangedEventHandler)->
      0940fcf8(System.Object[])->
      0940fcd8(System.Collections.Specialized.NotifyCollectionChangedEventHandler)->
      093ec050(Telerik.Windows.Controls.GridView.FilteringDropDown)->
      093b03a0(Telerik.Windows.Controls.RadGridView)->
    DOMAIN(068438B8):HANDLE(Strong):2731438:Root:  095b1f20(System.Windows.Controls.TextBlock)->
      095b20bc(System.Windows.Controls.Grid)->
      095b1c3c(System.Windows.Controls.ContentPresenter)->
      095b1be4(System.Windows.Controls.Grid)->
      095b04b0(System.Windows.Controls.Button)->
      095b0724(System.Windows.RoutedEventHandler)->
      093af0e4(NBA5.Reports)->
      093b03a0(Telerik.Windows.Controls.RadGridView)->
    DOMAIN(068438B8):HANDLE(Strong):2731458:Root:  093b0eec(Telerik.Windows.Controls.GridViewDataColumn)->
      093b03a0(Telerik.Windows.Controls.RadGridView)->
    DOMAIN(068438B8):HANDLE(Strong):273147c:Root:  0940e704(System.Windows.Controls.TextBox)->
      0940e8cc(System.Windows.DataContextChangedEventHandler)->
      0940e860(System.Windows.Data.BindingExpression)->
      0940fafc(Telerik.Windows.Data.FieldFilterDescription)->
      0940fbb4(Telerik.Windows.Data.RadObservableCollection`1[[Telerik.Windows.Data.FilterDescriptor, Telerik.Windows.Data]])->
      0940fd10(System.Collections.Specialized.NotifyCollectionChangedEventHandler)->
      0940fcf8(System.Object[])->
      0940fcd8(System.Collections.Specialized.NotifyCollectionChangedEventHandler)->
      093ec050(Telerik.Windows.Controls.GridView.FilteringDropDown)->
      093b03a0(Telerik.Windows.Controls.RadGridView)->
    DOMAIN(068438B8):HANDLE(Strong):27314a0:Root:  095b20bc(System.Windows.Controls.Grid)->
      095b1c3c(System.Windows.Controls.ContentPresenter)->
      095b1be4(System.Windows.Controls.Grid)->
      095b04b0(System.Windows.Controls.Button)->
      095b0724(System.Windows.RoutedEventHandler)->
      093af0e4(NBA5.Reports)->
      093b03a0(Telerik.Windows.Controls.RadGridView)->
    DOMAIN(068438B8):HANDLE(Strong):27314d8:Root:  093b1100(Telerik.Windows.Controls.GridViewDataColumn)->
      093b03a0(Telerik.Windows.Controls.RadGridView)->
    DOMAIN(068438B8):HANDLE(Strong):2736204:Root:  09415760(System.Windows.Controls.Border)->
      09415674(System.Windows.Controls.Border)->
      09415588(System.Windows.Controls.Grid)->
      093ceb34(System.Windows.Controls.Grid)->
      093cbd2c(System.Windows.Controls.Primitives.Thumb)->
      093cd958(System.Windows.Controls.Primitives.DragCompletedEventHandler)->
      093c38dc(System.Windows.Controls.Primitives.ScrollBar)->
      093c3cd8(System.Windows.Controls.Primitives.ScrollEventHandler)->
      093c2734(Telerik.Windows.Controls.GridView.GridViewScrollViewer)->
      093c0c60(Telerik.Windows.Controls.GridView.GridViewItemsControl)->
      093b03a0(Telerik.Windows.Controls.RadGridView)->
    DOMAIN(068438B8):HANDLE(Strong):2736210:Root:  09415674(System.Windows.Controls.Border)->
      09415588(System.Windows.Controls.Grid)->
      093ceb34(System.Windows.Controls.Grid)->
      093cbd2c(System.Windows.Controls.Primitives.Thumb)->
      093cd958(System.Windows.Controls.Primitives.DragCompletedEventHandler)->
      093c38dc(System.Windows.Controls.Primitives.ScrollBar)->
      093c3cd8(System.Windows.Controls.Primitives.ScrollEventHandler)->
      093c2734(Telerik.Windows.Controls.GridView.GridViewScrollViewer)->
      093c0c60(Telerik.Windows.Controls.GridView.GridViewItemsControl)->
      093b03a0(Telerik.Windows.Controls.RadGridView)->
    DOMAIN(068438B8):HANDLE(Strong):273621c:Root:  09415588(System.Windows.Controls.Grid)->
      093ceb34(System.Windows.Controls.Grid)->
      093cbd2c(System.Windows.Controls.Primitives.Thumb)->
      093cd958(System.Windows.Controls.Primitives.DragCompletedEventHandler)->
      093c38dc(System.Windows.Controls.Primitives.ScrollBar)->
      093c3cd8(System.Windows.Controls.Primitives.ScrollEventHandler)->
      093c2734(Telerik.Windows.Controls.GridView.GridViewScrollViewer)->
      093c0c60(Telerik.Windows.Controls.GridView.GridViewItemsControl)->
      093b03a0(Telerik.Windows.Controls.RadGridView)->
    DOMAIN(068438B8):HANDLE(Strong):2736274:Root:  09415520(System.Windows.Shapes.Rectangle)->
      09415038(System.Windows.Controls.Grid)->
      093ceacc(System.Windows.Controls.Grid)->
      093ca67c(System.Windows.Controls.Primitives.Thumb)->
      093cb21c(System.Windows.Controls.Primitives.DragCompletedEventHandler)->
      093c35dc(System.Windows.Controls.Primitives.ScrollBar)->
      093c3cb8(System.Windows.Controls.Primitives.ScrollEventHandler)->
      093c2734(Telerik.Windows.Controls.GridView.GridViewScrollViewer)->
      093c0c60(Telerik.Windows.Controls.GridView.GridViewItemsControl)->
      093b03a0(Telerik.Windows.Controls.RadGridView)->
    DOMAIN(068438B8):HANDLE(Strong):2736278:Root:  094154b8(System.Windows.Shapes.Rectangle)->
      094152fc(System.Windows.Controls.StackPanel)->
      09415038(System.Windows.Controls.Grid)->
      093ceacc(System.Windows.Controls.Grid)->
      093ca67c(System.Windows.Controls.Primitives.Thumb)->
      093cb21c(System.Windows.Controls.Primitives.DragCompletedEventHandler)->
      093c35dc(System.Windows.Controls.Primitives.ScrollBar)->
      093c3cb8(System.Windows.Controls.Primitives.ScrollEventHandler)->
      093c2734(Telerik.Windows.Controls.GridView.GridViewScrollViewer)->
      093c0c60(Telerik.Windows.Controls.GridView.GridViewItemsControl)->
      093b03a0(Telerik.Windows.Controls.RadGridView)->
    DOMAIN(068438B8):HANDLE(Strong):273627c:Root:  09415450(System.Windows.Shapes.Rectangle)->
      094152fc(System.Windows.Controls.StackPanel)->
      09415038(System.Windows.Controls.Grid)->
      093ceacc(System.Windows.Controls.Grid)->
      093ca67c(System.Windows.Controls.Primitives.Thumb)->
      093cb21c(System.Windows.Controls.Primitives.DragCompletedEventHandler)->
      093c35dc(System.Windows.Controls.Primitives.ScrollBar)->
      093c3cb8(System.Windows.Controls.Primitives.ScrollEventHandler)->
      093c2734(Telerik.Windows.Controls.GridView.GridViewScrollViewer)->
      093c0c60(Telerik.Windows.Controls.GridView.GridViewItemsControl)->
      093b03a0(Telerik.Windows.Controls.RadGridView)->
    DOMAIN(068438B8):HANDLE(Strong):2736284:Root:  09415364(System.Windows.Shapes.Rectangle)->
      094152fc(System.Windows.Controls.StackPanel)->
      09415038(System.Windows.Controls.Grid)->
      093ceacc(System.Windows.Controls.Grid)->
      093ca67c(System.Windows.Controls.Primitives.Thumb)->
      093cb21c(System.Windows.Controls.Primitives.DragCompletedEventHandler)->
      093c35dc(System.Windows.Controls.Primitives.ScrollBar)->
      093c3cb8(System.Windows.Controls.Primitives.ScrollEventHandler)->
      093c2734(Telerik.Windows.Controls.GridView.GridViewScrollViewer)->
      093c0c60(Telerik.Windows.Controls.GridView.GridViewItemsControl)->
      093b03a0(Telerik.Windows.Controls.RadGridView)->
    DOMAIN(068438B8):HANDLE(Strong):2736294:Root:  094152fc(System.Windows.Controls.StackPanel)->
      09415038(System.Windows.Controls.Grid)->
      093ceacc(System.Windows.Controls.Grid)->
      093ca67c(System.Windows.Controls.Primitives.Thumb)->
      093cb21c(System.Windows.Controls.Primitives.DragCompletedEventHandler)->
      093c35dc(System.Windows.Controls.Primitives.ScrollBar)->
      093c3cb8(System.Windows.Controls.Primitives.ScrollEventHandler)->
      093c2734(Telerik.Windows.Controls.GridView.GridViewScrollViewer)->
      093c0c60(Telerik.Windows.Controls.GridView.GridViewItemsControl)->
      093b03a0(Telerik.Windows.Controls.RadGridView)->
    DOMAIN(068438B8):HANDLE(Strong):2736298:Root:  09415210(System.Windows.Controls.Border)->
      09415124(System.Windows.Controls.Border)->
      09415038(System.Windows.Controls.Grid)->
      093ceacc(System.Windows.Controls.Grid)->
      093ca67c(System.Windows.Controls.Primitives.Thumb)->
      093cb21c(System.Windows.Controls.Primitives.DragCompletedEventHandler)->
      093c35dc(System.Windows.Controls.Primitives.ScrollBar)->
      093c3cb8(System.Windows.Controls.Primitives.ScrollEventHandler)->
      093c2734(Telerik.Windows.Controls.GridView.GridViewScrollViewer)->
      093c0c60(Telerik.Windows.Controls.GridView.GridViewItemsControl)->
      093b03a0(Telerik.Windows.Controls.RadGridView)->
    DOMAIN(068438B8):HANDLE(Strong):27362a4:Root:  09415124(System.Windows.Controls.Border)->
      09415038(System.Windows.Controls.Grid)->
      093ceacc(System.Windows.Controls.Grid)->
      093ca67c(System.Windows.Controls.Primitives.Thumb)->
      093cb21c(System.Windows.Controls.Primitives.DragCompletedEventHandler)->
      093c35dc(System.Windows.Controls.Primitives.ScrollBar)->
      093c3cb8(System.Windows.Controls.Primitives.ScrollEventHandler)->
      093c2734(Telerik.Windows.Controls.GridView.GridViewScrollViewer)->
      093c0c60(Telerik.Windows.Controls.GridView.GridViewItemsControl)->
      093b03a0(Telerik.Windows.Controls.RadGridView)->
    DOMAIN(068438B8):HANDLE(Strong):27362ac:Root:  09415038(System.Windows.Controls.Grid)->
      093ceacc(System.Windows.Controls.Grid)->
      093ca67c(System.Windows.Controls.Primitives.Thumb)->
      093cb21c(System.Windows.Controls.Primitives.DragCompletedEventHandler)->
      093c35dc(System.Windows.Controls.Primitives.ScrollBar)->
      093c3cb8(System.Windows.Controls.Primitives.ScrollEventHandler)->
      093c2734(Telerik.Windows.Controls.GridView.GridViewScrollViewer)->
      093c0c60(Telerik.Windows.Controls.GridView.GridViewItemsControl)->
      093b03a0(Telerik.Windows.Controls.RadGridView)->
     
  2. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 24 Sep 2009 Link to this post

    Hi John Morris,

    It is possible that there are memory leaks somewhere left. Did you try your scenario with the SL3 navigation? Basically it is recommended to use the navigation from the framework, because for the moment we don't plan to develop the Telerik page navigation framework anymore.

    Kind regards,
    Valentin.Stoychev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. DevCraft banner
Back to Top