### Method

# GObject Object ref

#### Declaration [src]

    GObject*
    g_object_ref (
      GObject* object
    )

#### Description [src]

Increases the reference count of `object`.

Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type of `object` will be propagated to the return type (using the GCC `typeof()` extension), so any casting the caller needs to do on the return type must be explicit.

#### Return value

Type: `GObject`

The same `object`.

The returned data is owned by the instance.