Re: CORBA_free() question
- From: Michael Meeks <michael ximian com>
- To: Chris Wareham <chris wareham iosystems co uk>
- Cc: orbit <orbit-list gnome org>
- Subject: Re: CORBA_free() question
- Date: 28 May 2003 12:53:36 +0100
On Tue, 2003-05-27 at 16:32, Chris Wareham wrote:
> I have a utility function which returns an object reference by looking
> it up in the Naming service.
The Naming service is pure pain to use AFAIR; ;-)
> I'm just wondering of I need to call
> CORBA_free() on the id and kind fields of the NameComponent. The OMG
> mapping docs are a little bit light on information like that, and I
> can't find any "real world" examples.
You need to CORBA_free everything you CORBA_allocate, except that is if
you do a deep free, in which case there's no point in freeing the
> name_components.id = CORBA_string_dup(id);
> name_components.kind = CORBA_string_dup(kind);
These dups are not necessary - unless 'name' is an InOut argument ( is
it ? ) - for an in argument one just has to garentee the lifetime of the
strings over the method call.
firstname.lastname@example.org <><, Pseudo Engineer, itinerant idiot
] [Thread Prev