Bug 39147 - Memory leak with new Material design
Summary: Memory leak with new Material design
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.0.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-02-26 02:46 UTC by khasan
Modified: 2017-03-08 14:35 UTC (History)
4 users (show)

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

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:

Description khasan 2016-02-26 02:46:24 UTC
There is memory leak in Xamarin Forms for Android( when use new material design. If I push and pop pages in navigation there would be OutOfMemoryException thrown. If I don't apply Material design evrything works without crash.
Comment 1 Peter Bro 2016-06-08 14:16:50 UTC
We are experiencing the same issue with the severe memory leak when using the FormsAppCompatActivity in the main activity. 

When running with the Xamarin Profiler we can see that the majority of objects and allocated memory are never freed. 

We tried to change back to using non AppCompat (and there by non material design) 
by using the FormsApplicationActivity instead. This made a significant memory leak improvement.

When we used the AppCompat the application quickly went to a working set of 150 Mb and it kept on increasing.
When we used FormsApplicationActivity instead then it started at 24 Mb and pretty much stayed there.

We am primary testing on android 4.2.2 and 4.4.4. 
XF version, 
Xamarin.Android.Support.v7.AppCompat version 23.3.0.

Any comments on when this will be looked at or comments on a possible workaround are much appreciated.
Comment 2 Jacob Biehl 2016-07-15 17:01:55 UTC
See bug 40955.  2.3.1 resolved this issue for me.
Comment 3 adrianknight89 2016-11-13 02:15:26 UTC
If this is fixed, can it be closed? Please test with the latest pre-release.
Comment 4 Paul DiPietro [MSFT] 2017-03-08 14:35:49 UTC
Assuming fixed until otherwise reported.