Function

GLib-2.0GLibslice_free_chain_with_offsetSince 2.10

  • Frees a linked list of memory blocks of structure type type.

    The memory blocks must be equal-sized, allocated via g_slice_alloc() or g_slice_alloc0() and linked together by a next pointer (similar to GLib.SList). The offset of the next field in each block is passed as third argument. Note that the exact release behaviour can be changed with the G_DEBUG=gc-friendly environment variable.

    If mem_chain is null, this function does nothing.

    Since GLib 2.76 this always uses the system free_sized() implementation internally.

    Parameters

    • block_size: number

      the size of the blocks

    • mem_chain: any

      a pointer to the first block of the chain

    • next_offset: number

      the offset of the next field in the blocks

    Returns void

    2.10