return_value_policy::take_ownership for nested pointers #5462
Unanswered
marcingretl
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
let's assume that function returns py::dict* with return_value_policy::take_ownership set explicitly (let's call in dictionary A). Now let's assume that under a key "B" A contains a pointer to another dictionary, i.e. py::dict *.
Question: will both pointers be deleted on python exit, or just A (an external) and B will cause a memory leak?
Beta Was this translation helpful? Give feedback.
All reactions