Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The default return_value_policy for py::cast calls is return_value_policy::automatic_reference (as described here: http://pybind11.readthedocs.io/en/stable/advanced/functions.html#return-value-policies). This means that pybind was treating the index as a reference, and not taking ownership of it and calling the desctructor when the python object was freed. Fix by explicitly telling pybind to take ownership here.
- Loading branch information