[omniORB] Problems with method returning a complex structure

Andy Weber Andy@arcontech.com
Mon, 3 Jul 2000 13:53:50 +0100


Thanks to both Sai-Lai Lo and Duncan Grisby for their rapid responses to
my questions.

Is there any *essential* difference between Sai-Lai Lo's recommendation:

>updates * recordData_i::refresh()
>{
>  updates_var  Result = new updates();
        ....
>
>  return Result._retn();
>}
and Duncan Grisby's (which was my original attempt):

> updates * recordData_i::refresh()
> {
>         updates         *Result;        // has to be new'd!!
> 
>         Result = new updates();
>         ...
>         return Result;
> }

I have now tried both, and both work fine.  I don't know why my original
didn't work originally!  It was probably because I was using the wrong
library as Duncan suggests.

Thanks once again.

Andy Weber
-- 
Andy Weber
Arcontech Ltd                           Phone +44 (0) 20 7405 2111
31-35 Kirby Street                      Fax   +44 (0) 20 7831 6667
London EC1N 8TE                         E-mail andy@arcontech.com