Expose allocated memory from C++ to python in trampoline class #331
Closed
ThoreWietzke
started this conversation in
General
Replies: 1 comment
-
This issue is resolved given that #334 is merged. |
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
-
This thread is the outcom from issue #330.
I have the following function, which allocates memory and calls a member function of a class which modifies the data in the allocated Memory:
The base class looks like
with a trampoline to Python
I want to expose the allocated memory inside
foo()
in the corresponding Python implementation offunc()
. In pybind11 this worked.Is this the way to go in nanobind? Are there other ways to expose allocated memory to Python?
Beta Was this translation helpful? Give feedback.
All reactions