GLib.VariantType.new
Description: Reference for GLib.VariantType.new

### Function

# GLib VariantTypenew

since: 2.24

#### Declaration [src]

    GVariantType*
    g_variant_type_new (
      const gchar* type_string
    )

#### Description [src]

Creates a new `GVariantType` corresponding to the type string given by `type_string`.

It is appropriate to call `g_variant_type_free()` on the return value.

It is a programmer error to call this function with an invalid type string. Use `g_variant_type_string_is_valid()` if you are unsure.

Available since: 2.24

#### Parameters

`type_string`

  Type: `const gchar*`

  A valid GVariant type string.

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

#### Return value

Type: `GVariantType`

A new `GVariantType`.

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