Do you have any update of when the "Out of memory" error will be fixed when using navigation pages on Android ?
Thank you ! Have a good day !
Are you referring to a confirmed bug in bugzilla or do you just get an out of memory error in your app?
Yes I think I'm referring to a confirmed bug in bugzilla :
I get this error when navigating backward and forward a lot of times and it seems that pages are not destroyed / recycled properly in memory.
Xamarin.Forms can almost not be used to produce real apps at the moment with this issue... sad
A possible workaround, when you navigate back and forth between pages, instead of creating a new one each time, have a list of constructed pages and push and pop them.
var page = dictionary[pageKey];
It would prevent old pages not being destroyed.
Also if you have any event handlers or other things in your view that keeps it referenced to a view model or something similar then the page is unlikely to be destroyed even when you have navigated past it. It will stay in memory even though you can never get back to it. Building the page with OnAppearing, rather than in the constructor is how you get around refreshing the page when it is shown again.
Thank you for the workaround I will give it a try for sure ;-) !
Anyway, I hope this critical issue will be resolved someday !
Have a nice day !
Do you guys have any examples of this working? Our whole app is giving an OOM error and crashing, making the app unusable. The iOS version is working really well though. Could it also be some faulty assets perhaps?
Xamarin Inc., as a wholly-owned Microsoft subsidiary acting as a separate legal entity, adheres to the Microsoft Privacy Statement: Privacy & cookies