<!-- ##### SECTION Title ##### -->
Allocators

<!-- ##### SECTION Short_Description ##### -->
Memory allocation functions for CORBA types.

<!-- ##### SECTION Long_Description ##### -->
<para>

</para>

<!-- ##### SECTION See_Also ##### -->
<para>

</para>

<!-- ##### SECTION Stability_Level ##### -->


<!-- ##### MACRO CORBA_sequence_set_release ##### -->
<para>
    CORBA_sequence_set_release() can be used to set the state of the
    release flag. If the flag is set to %TRUE, the sequence effectively
    "owns" the storage pointed to by <structfield>_buffer</structfield>; if
    %FALSE, the programmer is responsible for the storage. If, for
    example, a sequence is returned from an operation with its release
    flag set to %FALSE, calling CORBA_free() on the returned sequence
    pointer will not deallocate the memory pointed to by
    <structfield>_buffer</structfield>.
</para>
<para>
    Also, passing a null pointer or a pointer to something other than
    a sequence type to either CORBA_sequence_set_release() or
    CORBA_sequence_get_release() produces undefined behavior.
</para>
<para>
    CORBA_sequence_set_release() should only be used by the creator of a
    sequence. If it is not called for a given sequence instance, then
    the default value of the release flag for that instance is %FALSE.
</para>

@s: a CORBA sequence
@r: the new value of the release flag


<!-- ##### MACRO CORBA_sequence_get_release ##### -->
<para>
    Before calling CORBA_free() on the
    <structfield>_buffer</structfield> member of a sequence directly,
    the programmer should check the release flag using
    CORBA_sequence_get_release(). If it returns %FALSE, the programmer
    should not invoke CORBA_free() on the
    <structfield>_buffer</structfield> member; doing so produces
    undefined behavior.
</para>

@s: a CORBA sequence


<!-- ##### FUNCTION CORBA_free ##### -->
<para>
    This function should be used to free memory that has been
    previously allocated with any CORBA memory allocation function.
    It does deep/recursive/intelligent deallocation of memory,
    including deallocation of values of <type>CORBA_any</type> types,
    sequence buffers and elements, etc.
</para>

@mem: pointer to any memory block allocated by CORBA/ORBit


<!-- ##### FUNCTION ORBit_alloc_tcval ##### -->
<para>
    Allocates a memory buffer that can hold @nelemems elements of type @tc.
</para>

@tc: typecode of the elements of the array
@nelements: number of elements of the array
@Returns: the address of the newly allocated memory buffer


<!-- ##### FUNCTION ORBit_realloc_tcval ##### -->
<para>
    Changes the size of a CORBA memory buffer.
</para>

@old: old memory segment, possibly allocated by ORBit_alloc_tcval()
@tc: typecode of the elements of the array
@old_num_elements: current number of elements of the array
@num_elements: new desired size of the array
@Returns: the new location of the array


