[C++-sig] set python attribute from C++
Gennadiy Rozental
rogeeff at gmail.com
Thu Jul 17 20:38:03 CEST 2008
English, Mark <Mark.English <at> rbccm.com> writes:
> However, the scenario I never got passed was this:
>
> Python code derives a class "PyFoo" from exposed C++ class "Foo".
> Python code creates an instance of "PyFoo" and passes it to C++ code
> which expects a my_smart_ptr<Foo>.
> C++ code stores my_smart_ptr<Foo> in a container for later retrieval.
> Python code deletes its reference to the "PyFoo" instance.
> "PyFoo" object reference count falls to 0 and object is no longer used
It shouldn't be a problem in my case, since Foo instance holds reference back to
the python object.
Gennadiy
More information about the Cplusplus-sig
mailing list