[omniORB] passing strings from c++ to python
Stefan Seefeld
seefeld@sympatico.ca
Thu Jun 27 20:27:01 2002
Warren Brown wrote:
> Hi
>
>
>
> If I create a CORBA::string_var with c++ and pass it using .-retn(),
> will python do the garbage collection when the string goes out of scope?
It's the ORB that does the garbage collection. That needs to be the case
since the method invocation is location transparent, i.e. when you
return some memory, you don't know whether the caller will live in the
same address space. The data may have been marshalled on the way. I
guess in cases where you cross language boundaries you generally need to
partially marshall the data, too, as the memory representation of the
types involved may not be the same. That's what CORBA is all about: it
makes these things transparent to the user.
Stefan