Bug 51728 - Page Memory Leak
Summary: Page Memory Leak
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.3.4
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-01-24 08:40 UTC by Adam
Modified: 2017-01-29 04:54 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Repro (261.62 KB, application/x-zip-compressed)
2017-01-24 08:40 UTC, Adam
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:
Status:
RESOLVED NOT_REPRODUCIBLE

Description Adam 2017-01-24 08:40:44 UTC
Created attachment 19456 [details]
Repro

From version 2.3.1.144 and upwards, if you have a ListView on another page, navigate to it, then pop it from the NavigationPage, it will not release the memory. Keep going back and forth and the memory will continue to rise.

This does not happen when the same code is run in version 2.3.0

Simple Repro attached.
Comment 1 Adam 2017-01-24 08:42:02 UTC
Forgot to mention, happens on all platforms.
Comment 2 Jon Goldberger [MSFT] 2017-01-25 01:38:48 UTC
Running the test project I do see the app growing by about 300-400 bytes each time you go back to the main page from the list page. Running profiler on the app (tested the Android version only) I see the same growth with the app growing between 10-15 objects and 300-400 bytes total each time you go back to the main page from the list page. 

Despite what is said in the bug description, I do see the same kind of growth after downgrading to Forms 2.3.0.
Comment 3 Adam 2017-01-25 02:18:39 UTC
I will need to double check the version number, but I just did a quick test on 2.1.0 and it certainly isn't apparent in that version, but it is in 2.3.1.
Comment 4 Jon Goldberger [MSFT] 2017-01-25 18:50:37 UTC
I am seeing the exact same kind of growth with 2.1.0 also:
https://screencast.com/t/51OlPO9QfT

Each snapshot was taken after navigating back to the main page from the list page.
Comment 5 Adam 2017-01-29 04:54:03 UTC
I tested this with the Xamarin Forms source code direct from github, and I can no longer see the leak. I suspect a recent PR might have fixed it.

I will close this for now and reopen if I still see it in 2.3.4-pre2