Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
I'm not sure if this can be seen as bug. It's more a feature request.
All custom renderers on iOS and Android implement IDisposable and Dispose gets called as it should. So all resources can be closed.
Unfortunately on Windows Phone the renderers don't implement that interface. So I cannot free my resources in my custom WP renderers.
I tried to find some other event I can attach to.
FrameworkElement.Unloaded gets called when another page is pushed to the stack, so that would be too early.
In OnElementChanged in the renderer e.OldElement is always null on all platforms. So this can also not be used.
The best I could find is NavigationPage.Popped where I check if my Element is on the Page being popped and dispose of it if that is the case. But what if there is no NavigationPage?
The cleanest solution would be to simply implement IDisposable in all renderers. And of course also call Dispose if the Element/its renderer is not used anymore.
Thank you for your report. At this time there are no plans to implement any changes around this issue.
Xamarin Forms Team