I hope to have the functionality to pass an R's external pointer object to python, possibly by converting it into a capsule object. So that
- the pointer and the underlying data are shared between R and python.
- R's external pointer object won't be freed while python is still pointing to it.
It would be similar to how memory are shared between numpy array and R's array.
If you think this idea is reasonable, I can try to implement it and submit a PR when I have time.