diff options
author | E.Z. Hart <hartez@users.noreply.github.com> | 2016-08-02 14:54:57 -0600 |
---|---|---|
committer | Jason Smith <jason.smith@xamarin.com> | 2016-08-02 13:54:57 -0700 |
commit | 34048b7bb4e8bf55c712ffd92303cf260c491c0e (patch) | |
tree | 19236fb4e72b8833c87e19fd15d0958b947764fc /Xamarin.Forms.Platform.WinRT | |
parent | 08e282350cb3f1c2345125682f14934111af2f9c (diff) | |
download | xamarin-forms-34048b7bb4e8bf55c712ffd92303cf260c491c0e.tar.gz xamarin-forms-34048b7bb4e8bf55c712ffd92303cf260c491c0e.tar.bz2 xamarin-forms-34048b7bb4e8bf55c712ffd92303cf260c491c0e.zip |
Change SourceChanged event on ImageSource to weak event to allow Images (#268)
referencing application-wide StaticResource ImageSources to be GCed
Diffstat (limited to 'Xamarin.Forms.Platform.WinRT')
-rw-r--r-- | Xamarin.Forms.Platform.WinRT/WindowsDeviceInfo.cs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Xamarin.Forms.Platform.WinRT/WindowsDeviceInfo.cs b/Xamarin.Forms.Platform.WinRT/WindowsDeviceInfo.cs index f3d6d100..235fe2db 100644 --- a/Xamarin.Forms.Platform.WinRT/WindowsDeviceInfo.cs +++ b/Xamarin.Forms.Platform.WinRT/WindowsDeviceInfo.cs @@ -77,9 +77,13 @@ namespace Xamarin.Forms.Platform.WinRT if (_isDisposed) return; + if (disposing) + { + _information.OrientationChanged -= OnOrientationChanged; + _information = null; + } + _isDisposed = true; - _information.OrientationChanged -= OnOrientationChanged; - _information = null; base.Dispose(disposing); } |