Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

-[MGLStyle removeLayer:] relies on undefined behavior #7211

Closed
1ec5 opened this issue Nov 28, 2016 · 1 comment
Closed

-[MGLStyle removeLayer:] relies on undefined behavior #7211

1ec5 opened this issue Nov 28, 2016 · 1 comment
Assignees
Labels
bug iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS runtime styling
Milestone

Comments

@1ec5
Copy link
Contributor

1ec5 commented Nov 28, 2016

Per #6097 (comment), the -removeFromMapView: method in each of the concrete MGLStyleLayer subclasses relies on undefined behavior by reinterpret_casting a unique_ptr to the mbgl::style::Layer. This code was added to the iOS and macOS SDKs in #7048. The Android SDK is doing something a bit different in #7039: move-ing a unique_ptr but not reinterpret_casting it.

/cc @jfirebaugh @boundsj

@1ec5 1ec5 added bug iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS runtime styling labels Nov 28, 2016
@1ec5 1ec5 added this to the ios-v3.4.0 milestone Nov 28, 2016
@boundsj boundsj self-assigned this Nov 29, 2016
@boundsj
Copy link
Contributor

boundsj commented Nov 30, 2016

This was fixed by #7227

@boundsj boundsj closed this as completed Nov 30, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS runtime styling
Projects
None yet
Development

No branches or pull requests

2 participants