Best way to wrap a struct with a const char*
field
#4556
Unanswered
huidong-chen
asked this question in
Q&A
Replies: 1 comment
-
Why not just using |
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
-
Hello,
I am creating python binding for a C++ struct that I cannot modify, as below:
Naturally we need to create its instance as below in python:
Therefore, I choose to implement the binding code as below:
This will have memory leak because the memory allocation doesn't have a chance to be released. What is the best way to create python binding for this struct please?
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions