Re: Question about CORBA_sequence_CORBA_octet



Carlos Perelló Marín <carlos gnome-db org> writes:
> Who could tell me the utility of the CORBA_sequence_CORBA_octet's member
> "_release"?
> 
> typedef struct
>    {
>       CORBA_unsigned_long _maximum,
>        _length;
>       CORBA_octet *_buffer;
>       CORBA_boolean _release;
>    }
>    CORBA_sequence_CORBA_octet;
> 
> Thanks in advance.
> 

Check out the C bindings chapter in the CORBA spec. Specifically
section 19.11.

Basically calling CORBA_free() on the sequence will free _buffer if 
you have called CORBA_sequence_set_release (sequence, TRUE).
The default value is false, so if you allocate the buffer with your
allocbuf() function and don't call set_release you end up leaking
memory most of the time.

The _release field there is ORBit-specific, to be portable across ORBs
you are supposed to call the get/set release functions.

Havoc



_______________________________________________
gnome-hackers mailing list
gnome-hackers gnome org
http://mail.gnome.org/mailman/listinfo/gnome-hackers




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