In my Xamarin app, I have Five pages, Page 1, Page 2, Page 3, Page 4 and Page 5. When navigating from Page 5 to Page 3, I called Navigation.RemovePage() to remove Page 4 in NavigationStack. However, there is huge memory leak when calling RemovePage(). I want to know if there is any workaround to avoid memory leak when trying to remove the page between two pages in the NavigationStack? (Since Page 3 is not the Root Page, so I can't use PopToRootAsync())
Also, anyone can explains me why using PushModalAsync() will remove all pages in NavigationStack and only leaves the current added page and in both NavigationStack and ModalStack.
Thank you very much.