Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 13477 [details]
Not all children pages pushed in a NavigationPage are collected once navigated away from.
**Steps to Reproduce:**
1. Run the attached sample on an Android simulator.
2. Press the Open button to navigate to page 2.
3. Note the count at the top of the screen.
4. Press the back button to go back to page 1.
5. Repeat steps 2-4.
The count being used to track page instances increases to 5 before a page is finalized. Then, it stays at 4 with repeated tests.
The count should not increase past 1.
**Build Date & Platform:**
Created attachment 20839 [details]
Correct repro project
The original repro project has a bug where the decrement of _liveCount doesn't get called in the finalizer (to see this, run it against the latest stable version of XF and notice that the Debug.WriteLine call in the finalizer writes to the debug console, but the value of the counter doesn't actually decrement).
I'm uploading a corrected repro project which uses the latest stable (22.214.171.124) and demonstrates that the counter never goes above 2 (one for the currently displayed page and one for the last page popped off of the navigation stack), which is the expected behavior.