I use method AddContentView for add my view in Activity:
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
global::Xamarin.Forms.Forms.Init (this, bundle);
LoadApplication (new App());
this.AddContentView (myView, layoutPararms);
}
protected override void OnBackPressed ()
{
this.RemoveAllViews() //this method does not contain in Activity
}
I press 'back' button and open my application many times.
The memory overflows because I add view in Activity every time in OnCreate method.
How can I remove all views from activity?