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

Backend::activate/deactivate need to be reentrant #7163

Closed
jfirebaugh opened this issue Nov 23, 2016 · 3 comments
Closed

Backend::activate/deactivate need to be reentrant #7163

jfirebaugh opened this issue Nov 23, 2016 · 3 comments
Assignees
Labels
iOS Mapbox Maps SDK for iOS release blocker Blocks the next final release
Milestone

Comments

@jfirebaugh
Copy link
Contributor

In some contexts, Backend::activate can be called when the backend is already active. One example is if Map::addLayer is called during notifications such as MapChangeWillStartRenderingFrame and MapChangeRegionDidChangeAnimated.

Therefore Backend::activate / Backend::deactivate need to count the number of calls in a reference counting manner. Deactivation should happen only when the count reaches 0.

I feel like we did this at one point. Did it regress as part of the Backend changes?

cc @kkaefer @boundsj

@jfirebaugh
Copy link
Contributor Author

#5874, #5836, #5721

@jfirebaugh jfirebaugh added release blocker Blocks the next final release iOS Mapbox Maps SDK for iOS Android Mapbox Maps SDK for Android and removed Android Mapbox Maps SDK for Android labels Nov 23, 2016
@jfirebaugh jfirebaugh added this to the ios-v3.4.0 milestone Nov 23, 2016
@jfirebaugh
Copy link
Contributor Author

Ok, looks like we refcount on Android but not iOS.

@boundsj
Copy link
Contributor

boundsj commented Nov 29, 2016

This was fixed by #7208

@boundsj boundsj closed this as completed Nov 29, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
iOS Mapbox Maps SDK for iOS release blocker Blocks the next final release
Projects
None yet
Development

No branches or pull requests

2 participants