Xamarin.forms: [WPF] Memory leak when you pop a TabbedPage

Created on 10 Jul 2018  路  2Comments  路  Source: xamarin/Xamarin.Forms

Description

If you use a NavigationPage and push and then pop a TabbedPage, the renderers for elements on the first child of the TabbedPage are instantiated again after it has been removed.

Steps to Reproduce

  1. use a NavigationPage as MainPage
  2. PushAsync a TabbedPage
  3. go back from the TabbedPage so that it should be popped

Expected Behavior

All renderers needed by the TabbedPage and any children should be disposed and not instantiated again.

Actual Behavior

The renderers of the current child of the TabbedPage are first disposed and then the renderers of the first child are instantiated again.

Basic Information

  • Version with issue: 3.1.0.583944
  • IDE: VS 2017 15.8, Preview 3
  • Platform Target Frameworks:

    • WPF, .NET Framework 4.6.1

Reproduction Link

Repro.WPFTabbedPage.zip
This repro project uses a CustomPage with its own CustomPageRenderer to show the problem. It displays some messages in the lower half of the screen. These show, when a page is pushed/popped by the NavigationPage and which methods are called in the CustomPageRenderer. It all looks fine while you open the TabbedPage and switch between children. But when you go back, the renderers for the first child page are instantiated again.

4 WPF bug

All 2 comments

Thanks for the repro; described behavior does occur.

Very good report, I will look at that

Was this page helpful?
0 / 5 - 0 ratings