### Method

# GLib String free_and_steal

since: 2.76

#### Declaration [src]

    gchar*
    g_string_free_and_steal (
      GString* string
    )

#### Description [src]

Frees the memory allocated for the `GString`.

The caller gains ownership of the buffer and must free it after use with g_free().

Available since: 2.76

#### Parameters

`string`

  Type: `GString`

  A `GString`.

  The instance takes ownership of the data, and is responsible for freeing it.

#### Return value

Type: `gchar*`

The character data of `string`.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.
The value is a NUL terminated UTF-8 string.