charlenni / Mapsui.Forms

Xamarin.Forms wrapper around Mapsui
MIT License
6 stars 3 forks source link

On Android the Refresh message is not being disposed #13

Open josesimas opened 5 years ago

josesimas commented 5 years ago

Hello,

On the MapViewRenderer for iOS the Dispose method is overriden and the Refresh message is unsubscribed. This is missing on the Android MapViewRenderer. In my tests this message was not cleared in OnElementChanged and I had to add:

protected override void Dispose(bool disposing)
{
    MessagingCenter.Unsubscribe<MapView>(this, "Refresh");
    base.Dispose(disposing);
}

Maybe this should not be an issue but since you are moving on to a new implementation I thought I would leave this here in case someone finds it useful.