Camel.utils_weak_ref_new
Description: Reference for Camel.utils_weak_ref_new

### Function

# Camelutils_weak_ref_new

since: 3.40

#### Declaration [src]

    GWeakRef*
    camel_utils_weak_ref_new (
      gpointer object
    )

#### Description [src]

Allocates a new `GWeakRef` and calls `g_weak_ref_set()` with `object`.

Free the returned `GWeakRef` with camel_utils_weak_ref_free().

Available since: 3.40

This function is not directly available to language bindings.

#### Parameters

`object`

  Type: `gpointer`

  A `GObject` or `NULL`.

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

#### Return value

Type: `GWeakRef`

A new `GWeakRef`.

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