Skip to content
Snippets Groups Projects
Commit cfa09d47 authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

[pybind] Fix handle_from_new_ptr to actually take ownership

parent b7c19c13
No related branches found
No related tags found
1 merge request!44Pybind11
...@@ -127,7 +127,7 @@ namespace ...@@ -127,7 +127,7 @@ namespace
template <typename T> template <typename T>
inline py::object handle_from_new_ptr(T *ptr) inline py::object handle_from_new_ptr(T *ptr)
{ {
return py::cast(ptr); return py::cast(ptr, py::return_value_policy::take_ownership);
} }
template <typename T, typename ClType> template <typename T, typename ClType>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment