summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkingces95 <kingces95@users.noreply.github.com>2016-06-03 15:24:54 -0700
committerJason Smith <jason.smith@xamarin.com>2016-06-03 15:24:54 -0700
commitd1b8ac5c940c6f2ae6798337be53ececd60992f7 (patch)
treed2a9fbd270de6c26ca9dba65aeb7bc7bd769f95a
parent9948193b5bc68b0e70748b0887040e6faa765811 (diff)
downloadxamarin-forms-d1b8ac5c940c6f2ae6798337be53ececd60992f7.tar.gz
xamarin-forms-d1b8ac5c940c6f2ae6798337be53ececd60992f7.tar.bz2
xamarin-forms-d1b8ac5c940c6f2ae6798337be53ececd60992f7.zip
ViewRenderer unsubscribe from FocusChangeRequested on dispose (#193)
-rw-r--r--Xamarin.Forms.Platform.Android/ViewRenderer.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/Xamarin.Forms.Platform.Android/ViewRenderer.cs b/Xamarin.Forms.Platform.Android/ViewRenderer.cs
index 160c3828..63fef49c 100644
--- a/Xamarin.Forms.Platform.Android/ViewRenderer.cs
+++ b/Xamarin.Forms.Platform.Android/ViewRenderer.cs
@@ -86,6 +86,12 @@ namespace Xamarin.Forms.Platform.Android
_container = null;
}
+ if (Element != null && _focusChangeHandler != null)
+ {
+ Element.FocusChangeRequested -= _focusChangeHandler;
+ _focusChangeHandler = null;
+ }
+
_disposed = true;
}