[Ace-users] [tao-users] Is strdup required for return and out parameters
tpe at ida.liu.se
Thu Oct 18 10:02:17 CDT 2007
Chris Cleeland <cleeland at ociweb.com> writes:
> On Oct 18, 2007, at 7:40 AM, Vikram Karandikar wrote:
> > So either i should use strdup or CORBA::string_dup but stick to one.
> > am i right?
> No, you should use only CORBA::string_dup() when duplicating CORBA
> Consult the Henning & Vinoski book suggested by Christian for details
> and further information.
I have read the book but totally misssed this. So could you indicate
where it is discussed or why?
In page 147 i says that
char * p = CORBA::string_dup ("Hello");
is correct code but "Hello" is not a CORBA::String. And I routinely do
return CORBA::string_dup (res.c_str());
So what is the problem with this construction?
More information about the Ace-users