[omniORB] sequence question

mdavis@rwii.com mdavis@rwii.com
Fri, 1 Sep 2000 08:05:28 -0400


> Hi,
> 
> I have the following IDL:
> 
> typedef sequence<string> List;
> 
> interface X {
> 
>     List getNames( );
> 
> };
> 
> I've implemented the operation as follows:
> 
> List* getNames( ) {
> 
>     List_var list = new List( );
>     list.length( 2 );
> 
>     list[0] = "Jim";
>     list[1] = "Mary";
> 
>     return List::_duplicate( list );
> 
> }
> 
> 
> The compiler complains that _duplicate( ) is not a member of List.  Is
> there some other way I should be returning the List I create?
> 
> Thanks,
> Jim Dempsey
> SCT
> jdempsey@sctcorp.com
> 

use list.out().  It takes care of any messing memory management crap that you
would otherwise have to deal with.



-- 
Mike Davis           Real World Interface, a division of I.S. Robotics
mdavis@rwii.com      http://www.rwii.com
603-532-6900 x215    fax : 603-532-6901