diff options
author | E.Z. Hart <hartez@users.noreply.github.com> | 2017-01-12 14:43:57 -0700 |
---|---|---|
committer | Jason Smith <jason.smith@xamarin.com> | 2017-01-12 13:43:57 -0800 |
commit | ba7b66b83a83328f56e0676efcff5d3c553ac6bf (patch) | |
tree | 0d77274282c801aaadd3954850703f21b3967285 /Xamarin.Forms.Maps.iOS/FormsMaps.cs | |
parent | b6cb64e4930de9b16309f2d30c6bb0a2177048fd (diff) | |
download | xamarin-forms-ba7b66b83a83328f56e0676efcff5d3c553ac6bf.tar.gz xamarin-forms-ba7b66b83a83328f56e0676efcff5d3c553ac6bf.tar.bz2 xamarin-forms-ba7b66b83a83328f56e0676efcff5d3c553ac6bf.zip |
Fix out-of-memory crashes on iOS when creating maps (#467)
* Pool map views on iOS 10 to avoid memory issues
Clean up disposal implementation for map renderer, delegate
* Enable 39489 test on iOS
* Add missing XF Maps references
* Add missing maps reference to Windows 8.1 project
* Actually enable the test for iOS
* Fix placement of Isolate override
* Don't create a new control for ImageRenderer if NewElement is null
* Reverting fixes to ViewRenderer Dispose; have to fix that in a separate PR
Diffstat (limited to 'Xamarin.Forms.Maps.iOS/FormsMaps.cs')
-rw-r--r-- | Xamarin.Forms.Maps.iOS/FormsMaps.cs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Xamarin.Forms.Maps.iOS/FormsMaps.cs b/Xamarin.Forms.Maps.iOS/FormsMaps.cs index ca8dca67..19c0701e 100644 --- a/Xamarin.Forms.Maps.iOS/FormsMaps.cs +++ b/Xamarin.Forms.Maps.iOS/FormsMaps.cs @@ -7,6 +7,7 @@ namespace Xamarin { static bool s_isInitialized; static bool? s_isiOs8OrNewer; + static bool? s_isiOs10OrNewer; internal static bool IsiOs8OrNewer { @@ -18,6 +19,16 @@ namespace Xamarin } } + internal static bool IsiOs10OrNewer + { + get + { + if (!s_isiOs10OrNewer.HasValue) + s_isiOs10OrNewer = UIDevice.CurrentDevice.CheckSystemVersion(10, 0); + return s_isiOs10OrNewer.Value; + } + } + public static void Init() { if (s_isInitialized) |