### Function

# Gio Initable new

since: 2.22

#### Declaration [src]

    GObject*
    g_initable_new (
      GType object_type,
      GCancellable* cancellable,
      GError** error,
      const gchar* first_property_name,
      ...
    )

#### Description [src]

Helper function for constructing `GInitable` object. This is similar to `g_object_new()` but also initializes the object and returns `NULL`, setting an error on failure.

Available since: 2.22

This function is not directly available to language bindings.

#### Parameters

`object_type`

  Type: `GType`

  A `GType` supporting `GInitable`.

`cancellable`

  Type: `GCancellable`

  Optional `GCancellable` object, `NULL` to ignore.

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

`error`

  Type: `GError`

  A `GError` location to store the error occurring, or `NULL` to ignore.

  The data is owned by the caller of the function.

`first_property_name`

  Type: `const gchar*`

  The name of the first property, or `NULL` if no properties.

  The argument can be `NULL`.
  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`...`

  Type: ``

  The value if the first property, followed by and other property value pairs, and ended by `NULL`.

#### Return value

Type: `GObject`

A newly allocated `GObject`, or `NULL` on error.

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