Hi,
I had a bit of trouble deciding which mailing list to post this question
(Python or boost). I decided to post it here since the way I'm extending is
boost-specific, however the fundamental question is in regards to how Python
internally handles ownership. I do not feel there is a perfect location for
this question, so I hope you'll forgive the semi-off topicness of the
question.
Right now I'm exposing a function to Python that returns a pointer to a
custom object owned by a third party library. In most cases I can manage to
use boost::shared_ptr when I'm returning pointers, however since this is a
third party library I cannot do this. Since the pointer I'm returning is
owned and managed by another object, I gave my def() the following return
policy:
return_value_policy