### Function

# GObject CClosure new_swap

#### Declaration

    GClosure*
    g_cclosure_new_swap (
      GCallback callback_func,
      gpointer user_data,
      GClosureNotify destroy_data
    )

#### Description

Creates a new closure which invokes `callback_func` with `user_data` as the first parameter.

`destroy_data` will be called as a finalize notifier on the `GClosure`.

This function is not directly available to language bindings.

#### Parameters

`callback_func`

  Type: `GCallback`

  The function to invoke.

`user_data`

  Type: `gpointer`

  User data to pass to `callback_func`.

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

`destroy_data`

  Type: `GClosureNotify`

  Destroy notify to be called when `user_data` is no longer used.

#### Return value

Type: `GClosure`

A floating reference to a new `GCClosure`.

The data is owned by the called function.