### Function

# GLib clear_handle_id

since: 2.56

#### Declaration

    void
    g_clear_handle_id (
      guint* tag_ptr,
      GClearHandleFunc clear_func
    )

#### Description

Clears a numeric handler, such as a `GSource` ID.

`tag_ptr` must be a valid pointer to the variable holding the handler.

If the ID is zero then this function does nothing. Otherwise, `clear_func()` is called with the ID as a parameter, and the tag is set to zero.

A macro is also included that allows this function to be used without pointer casts.

Available since: 2.56

This function is not directly available to language bindings.

#### Parameters

`tag_ptr`

  Type: `guint*`

  A pointer to the handler ID.

  The data is owned by the caller of the function.

`clear_func`

  Type: `GClearHandleFunc`

  The function to call to clear the handler.