Do I need to clean up memory myself in xamarin.forms?

Viewed 349

I have a login page. After authorization, the user is taken to another page.

Device.BeginInvokeOnMainThread(() =>
 {
     Application.Current.MainPage = new Main_Page();
 });

Should I somehow clear the memory allocated for the login page?

2 Answers

Absolutely not, it is done automatically.

If you look at Xamarin PageRenderer code here. Xamarin Page class has Dispose() method implemented. So Page should be clean up by GC.

Related