Method

GObjectObjectremove_toggle_ref

since: 2.8

Declaration

void
g_object_remove_toggle_ref (
  GObject* object,
  GToggleNotify notify,
  gpointer data
)

Description

Removes a reference added with g_object_add_toggle_ref(). The reference count of the object is decreased by one.

Note that if you unref the object on another thread, then notify might still be invoked after g_object_remove_toggle_ref(), and the object argument might be a dangling pointer. If the object is destroyed on other threads, you must take care of that yourself.

Available since: 2.8

This method is not directly available to language bindings.

Parameters

notify

Type: GToggleNotify

A function to call when this reference is the last reference to the object, or is no longer the last reference.

data

Type: gpointer

Data to pass to notify, or NULL to match any toggle refs with the notify argument.

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