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

fix: use map views ref counts #822

Closed
wants to merge 1 commit into from

Conversation

paulinus
Copy link
Member

Summary:
Map data such as shots is exposed through view classes. We need to keep the map alive as long as some of its objects are alive in python. For this to happen, we need

  • make the views keep alive the map
  • make the shots keep alive the view

A better solution will be to use pybind's own bindings for unordered_map. However, this is only complete in pybind 2.8 pybind/pybind11#3310

Differential Revision: D32401524

Summary:
`Map` data such as `shots` is exposed through view classes. We need to keep the map alive as long as some of its objects are alive in python.  For this to happen, we need
- make the views keep alive the map
- make the shots keep alive the view

A better solution will be to use pybind's own bindings for `unordered_map`. However, this is only complete in pybind 2.8 pybind/pybind11#3310

Differential Revision: D32401524

fbshipit-source-id: 3fc30e710a2151dbb5097de8fe685ddfa80df675
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D32401524

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 547a278.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants