### Method

# GObject WeakRef set

since: 2.32

#### Declaration

    void
    g_weak_ref_set (
      GWeakRef* weak_ref,
      GObject* object
    )

#### Description

Change the object to which `weak_ref` points, or set it to `NULL`.

You must own a strong reference on `object` while calling this function.

Available since: 2.32

This method is not directly available to language bindings.

#### Parameters

`object`

  Type: `GObject`

  A `GObject` or `NULL`.

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