GLib.List.free
Description: Reference for GLib.List.free

### Function

# GLib Listfree

#### Declaration [src]

    void
    g_list_free (
      GList* list
    )

#### Description [src]

Frees all of the memory used by a `GList`. The freed elements are returned to the slice allocator.

If list elements contain dynamically-allocated memory, you should either use `g_list_free_full()` or free them manually first.

It can be combined with `g_steal_pointer()` to ensure the list head pointer is not left dangling:

    GList *list_of_borrowed_things = …;  /<!-- -->* (transfer container) *<!-- -->/
    g_list_free (g_steal_pointer (&list_of_borrowed_things));

This function is not directly available to language bindings.

#### Parameters

`list`

  Type: A list of `gpointer`

  The first link of a `GList`.

  The data is owned by the caller of the function.