Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Implement IDisposable on Element ?

$
0
0

I need at place to unsubscribe Pages/Controls from MessageCenter. OnDisappearing is not always useful.

For example, when pushing a detail page it calls the OnDisappearing on the list page doing the push - but I still need cloud sync events arriving at the list page.

It would useful if IDisposable with a virtual dispose method where implemented on Element and called internally in the framework.

Unless of course, MessageCenter automatically unsubscribes garbage collected subscribers. But that is not what the documentation says "Classes should unsubscribe from messages they no longer wish to receive."


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>