Gio.Settings.new
Description: Reference for Gio.Settings.new

### Constructor

# Gio Settingsnew

since: 2.26

#### Declaration [src]

    GSettings*
    g_settings_new (
      const gchar* schema_id
    )

#### Description [src]

Creates a new `GSettings` object with the schema specified by `schema_id`.

It is an error for the schema to not exist: schemas are an essential part of a program, as they provide type information. If schemas need to be dynamically loaded (for example, from an optional runtime dependency), `g_settings_schema_source_lookup()` can be used to test for their existence before loading them.

Signals on the newly created `GSettings` object will be dispatched via the thread-default `GMainContext` in effect at the time of the call to `g_settings_new()`. The new `GSettings` will hold a reference on the context. See `g_main_context_push_thread_default()`.

Available since: 2.26

#### Parameters

`schema_id`

  Type: `const gchar*`

  The ID of the schema.

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

#### Return value

Type: `GSettings`

A new `GSettings` object.

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