How do you call the destructor or when is it automatically called from python in pybind11?

Viewed 1477

If I am using the take_ownership return value policy in pybind11, and I invoke a function that returns, say, a std::vector<Dog>, how can I ensure that the vector and its contents' destructors are called? Does it have anything to do with going out of scope in the python client code?

1 Answers
Related