diff options
author | Julian Rex <julian.rex@mapbox.com> | 2018-03-23 16:12:34 -0400 |
---|---|---|
committer | Julian Rex <julian.rex@mapbox.com> | 2018-03-23 16:12:34 -0400 |
commit | 9b3d5272e78a3b6e8d6539d242519df3b7792acb (patch) | |
tree | 14ad0c355896d3dd779e90219cf21882edf4ba2d /platform/darwin/src/MGLOpenGLStyleLayer.mm | |
parent | 038915a94019c4cf1c324becc01b1f3abf7905f4 (diff) | |
download | qtlocation-mapboxgl-9b3d5272e78a3b6e8d6539d242519df3b7792acb.tar.gz |
Updates to macos and tests for previous changes.upstream/jrex-custom-layer-style-changed-leak-3
Diffstat (limited to 'platform/darwin/src/MGLOpenGLStyleLayer.mm')
-rw-r--r-- | platform/darwin/src/MGLOpenGLStyleLayer.mm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/platform/darwin/src/MGLOpenGLStyleLayer.mm b/platform/darwin/src/MGLOpenGLStyleLayer.mm index 2641369fd1..7b0200c56f 100644 --- a/platform/darwin/src/MGLOpenGLStyleLayer.mm +++ b/platform/darwin/src/MGLOpenGLStyleLayer.mm @@ -193,7 +193,9 @@ public: // We need to ensure that this layer is retained, so that any references from layer impl's // e.g. contexts) are still valid -// [style addToManagedLayers:self]; + +// [style addToManagedLayers:self]; // This is currently handled by the Custom layer, when the style +// sets itself to be the layer's observer [super addToStyle:style belowLayer:otherLayer]; } @@ -201,8 +203,9 @@ public: - (void)removeFromStyle:(MGLStyle *)style { [super removeFromStyle:style]; - // We need to ensure that this layer is now released (however, if this layer is about to be - // used by the renderer then it will released once rendering is complete) + // We need to ensure that this layer is now released (not necessarily freed) + // This is currently handled by the Custom layer, when the style + // unsets itself as the layer's observer // [style removeFromManagedLayers:self]; self.style = nil; |