Re: Corba_string object



On Fri, 2003-11-14 at 17:14, some one wrote:
> So for a CORBA_string object I should use first the
> allocate function and then the dup function?

	Nope; 'dup' implies allocation & a duplicate.

> struct employee myemp;
> myemp.name = CORBA_string_alloc(7);
> myemp.name = CORBA_string_dup("someone");

	NB. a function can't 'get at' the value of it's lvalue - so this was
always going to leak in C.

> Is CORBA_string nothing more than a typedef for
> CORBA_char*?

	Essentially yes.

	Regards,

		Michael.

-- 
 michael@ximian.com  <><, Pseudo Engineer, itinerant idiot




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]