[omniORB] Documentation of _retn() ... where

Sai-Lai Lo S.Lo@uk.research.att.com
26 Mar 1999 12:02:38 +0000


For the record, I should also add that the member functions were added
after 2.0 because some ORB vendors find it difficult to support what the
spec. required, i.e. T_var types can be passed as arguments to invocations
with no explicit casting. For instance, it is common to see ORBs leaking
memory if you pass a T_var to an OUT argument, any old storage managed by
the T_var is not freed.

You may be glad to know that omniORB2 is one of the few to fully support
the 2.0 behaviour. It was quite a challenge to work out how to do this.
Have a look at the stub generated for variable size OUT and INOUT arguments
and see if you can work out how this is done :-)

Sai-Lai



>>>>> David Riddoch writes:

> On Fri, 26 Mar 1999, Mark Howells wrote:
>> I'm sure this must be a FAQ.  
>> 
>> Where can I find documentation of the _retn() method.  I assume that this is
>> an omni specific feature as I've not found it in any of my references but it
>> also doesn't appear in the omni html or pdf docs ... at least not that I can
>> find.  Is there a manual somewhere I need to D/L?

> It is part of the CORBA 2.2 standard, and so is documented there. CORBA
> 2.2 adds the following members (or similar) to all T_var types:

>   const T_ptr in() const;
>   T_ptr& inout();
>   T_ptr& out();
>   T_ptr _retn();

> These correspond to passing arguments with in/inout/out mode, and
> returning a value. That is, _retn() returns the value being help by the
> _var, and the _var no longer manages the value. It will now contain the
> T::_nil() value.





-- 
Sai-Lai Lo                                   S.Lo@uk.research.att.com
AT&T Laboratories Cambridge           WWW:   http://www.uk.research.att.com 
24a Trumpington Street                Tel:   +44 223 343000
Cambridge CB2 1QA                     Fax:   +44 223 313542
ENGLAND