### Method

# GLib MainContext ref

#### Declaration

    GMainContext*
    g_main_context_ref (
      GMainContext* context
    )

#### Description

Increases the reference count on a `GMainContext` object by one.

#### Return value

Type: `GMainContext`

The `context` that was passed in (since 2.6).

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