Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map Snaphsotter calls Scheduler destructor #6

Open
ear7h opened this issue Aug 15, 2018 · 0 comments
Open

Map Snaphsotter calls Scheduler destructor #6

ear7h opened this issue Aug 15, 2018 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@ear7h
Copy link
Collaborator

ear7h commented Aug 15, 2018

This means that a passed Scheduler to NewMapSnapshotter will be destroyed when the MapSanpshotter gets destroyed. The cause of this is that the c++ constructor takes in shared_ptr<Scheduler> (which is currently being generated in the C.mbgl_map_sna... call.

Neither C or Go has a concept of generics to emulate the shared_ptr<T> type, one way to mitigate this issue is to always make Scheduler (rather the child class ThreadPool) a shared_pointer.

@ear7h ear7h added the bug Something isn't working label Aug 15, 2018
@ear7h ear7h self-assigned this Aug 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant