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

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

@1ec5

Description

@1ec5

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

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions