Skip to content

Conversation

@paulinus
Copy link
Contributor

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.

@paulinus paulinus deleted the export-D32401524 branch September 15, 2025 17:26
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