Return not an eigen matrix but a vector, what happens in memory? #3599
Unanswered
petrasvestartas
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,
I would like to ask how python and pybind11 manages C++ memory.
Before I was strictly using eigen matrices as is written in pybind11.
But I see that if I output a vector of integers, it still works.
For example I output a tuple of < std::vector< RowMatrixXd> and std::vector :
std::tuple< std::vector<RowMatrixXd>, std::vector<int>> pybind11_get_connection_zones();
What happens with the
std::vector<int>
?Do I need to delete it somehow?
These questions comes from the fact that I was using .NET before and each time I had to delete arrays from the memory.
Beta Was this translation helpful? Give feedback.
All reactions