GLib.slice_free_chain_with_offset
Description: Reference for GLib.slice_free_chain_with_offset

### Function

# GLibslice_free_chain_with_offset

since: 2.10

#### Declaration

    void
    g_slice_free_chain_with_offset (
      gsize block_size,
      gpointer mem_chain,
      gsize next_offset
    )

#### Description

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 `GSList`). 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`][G_DEBUG] environment variable.

If `mem_chain` is `NULL`, this function does nothing.

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

Available since: 2.10

#### Parameters

`block_size`

  Type: `gsize`

  The size of the blocks.

`mem_chain`

  Type: `gpointer`

  A pointer to the first block of the chain.

  The argument can be `NULL`.
  The data is owned by the caller of the function.

`next_offset`

  Type: `gsize`

  The offset of the `next` field in the blocks.