summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorJustin R. Miller <incanus@codesorcery.net>2015-02-10 11:47:50 -0800
committerJustin R. Miller <incanus@codesorcery.net>2015-02-10 11:47:50 -0800
commit9201133251a7e4bcc61ffecd9f08ce2d81e349a9 (patch)
treec4354d245d4c919bd2ef458ee60810c6351bef32 /platform
parentba6e3848dfd171722726ff91142ea5acc6d51c73 (diff)
downloadqtlocation-mapboxgl-9201133251a7e4bcc61ffecd9f08ce2d81e349a9.tar.gz
fixes #764: cyclical iOS reference
Diffstat (limited to 'platform')
-rw-r--r--platform/ios/MGLMapView.mm10
1 files changed, 4 insertions, 6 deletions
diff --git a/platform/ios/MGLMapView.mm b/platform/ios/MGLMapView.mm
index dde15567a2..ecac9552c8 100644
--- a/platform/ios/MGLMapView.mm
+++ b/platform/ios/MGLMapView.mm
@@ -1563,13 +1563,11 @@ class MBGLView : public mbgl::View
{
if (delay != std::chrono::steady_clock::duration::zero())
{
- __weak MGLMapView *weakNativeView = nativeView;
-
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, std::chrono::duration_cast<std::chrono::nanoseconds>(delay).count()), dispatch_get_main_queue(), ^
{
- [weakNativeView performSelector:@selector(notifyMapChange:)
- withObject:@(change)
- afterDelay:0];
+ [nativeView performSelector:@selector(notifyMapChange:)
+ withObject:@(change)
+ afterDelay:0];
});
}
else
@@ -1601,7 +1599,7 @@ class MBGLView : public mbgl::View
}
private:
- MGLMapView *nativeView = nullptr;
+ __weak MGLMapView *nativeView = nullptr;
};
@end