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.
I have tested with with the -pre6 and -pre2. If you take a look at my modified version of the Xamarin Forms Monkeys app https://github.com/EmmanVazz/Xamarin.Forms-Monkeys you will see that there is clearly a leak. You can push and pop the MonkeysPage and see the memory increase with each push.
I ran the linked GitHub project on an iPhone 6 10.2 simulator and used the Profiler to monitor the allocations. I would push the ListView page, pop it, and then take a snapshot so I could compare the number of new allocations.
I was able to reproduce the memory leak with Forms 2.3.4-pre6, however Forms 188.8.131.52-nightly showed a large improvement most likely due to this fix. That fix is _not_ included in any of the 2.3.4 pre-releases.
# Test Results
## Forms 2.3.4-pre6
Pushing then popping the page would average 5,000 new allocations. This caused the total memory allocated to go from 1.9MB at launch to 2.4MB after the first push. It then increased about 0.2MB for each subsequent cycle resulting in a total memory allocation of 3.9MB at the end of the test. Looking at the debug output, the ListView page was _not_ being destroyed.
## Forms 184.108.40.206-nightly
Each cycle now only resulted in around 130 new allocations. The total memory went from 1.8MB at launch to 2.4MB after the first push again but it then stabilized even after subsequent cycles. The debug output also now indicated that the ListView page was being destroyed after it was popped.
Debug outputs: https://gist.github.com/jimmgarrido/1b6f190ca53756d2a815452445e03d58
Full Xamarin Profiler results: https://www.dropbox.com/sh/wgmsjgvt4qdgr5f/AAATrsWCsn_MDPW1fVduCJLoa?dl=0