Verify return value policy for bindings
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 0
- Forks
- 0
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 2
Description
Return value policy

_Note: For further information check all the policies [here](https://pybind11.readthedocs.io/en/stable/advanced/functions.html#return-value-policies)_
In most of the cases that we are returning a pointer or a reference we are using `py::return_value_policy::reference_internal` however there are some cases where `py::return_value_policy::reference` is being used.
This should be verified to avoid undefined behavior.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating every binding that uses py::return_value_policy::reference or reference_internal, then compare each case with the pybind11 return-value-policy documentation linked in the issue. Done means every pointer or reference return has a verified policy and any unsafe use is identified for correction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100