Replies: 1 comment
-
Problem still not solved, it's there any suggestions? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
If a python object is gained from c++ function return, which may look like this:
c++ define
and python
This function using py::return_value_policy::reference, because the lifecyle is managed by c++.
When c++ is about to delete the pointer, how to detach it from python object or some way to disable python object? So that python object won't use c++ pointer anymore, to prevent crash.
I am porting a large library to python, so it is not convenience to change the original instance manage way to smart pointers.
Also, it is possible to find python object which hold the c++ pointer?
Beta Was this translation helpful? Give feedback.
All reactions