static void dispose (GObject *object) { SCPluginIfcfg *plugin = SC_PLUGIN_IFCFG (object); SCPluginIfcfgPrivate *priv = SC_PLUGIN_IFCFG_GET_PRIVATE (plugin); NMInotifyHelper *ih; if (priv->bus) { dbus_g_connection_unref (priv->bus); priv->bus = NULL; } if (priv->ih_event_id) { ih = nm_inotify_helper_get (); g_signal_handler_disconnect (ih, priv->ih_event_id); priv->ih_event_id = 0; if (priv->sc_network_wd >= 0) nm_inotify_helper_remove_watch (ih, priv->sc_network_wd); } if (priv->hostname_monitor) { if (priv->hostname_monitor_id) g_signal_handler_disconnect (priv->hostname_monitor, priv->hostname_monitor_id); g_file_monitor_cancel (priv->hostname_monitor); g_object_unref (priv->hostname_monitor); } g_free (priv->hostname); if (priv->connections) { g_hash_table_destroy (priv->connections); priv->connections = NULL; } if (priv->ifcfg_monitor) { if (priv->ifcfg_monitor_id) g_signal_handler_disconnect (priv->ifcfg_monitor, priv->ifcfg_monitor_id); g_file_monitor_cancel (priv->ifcfg_monitor); g_object_unref (priv->ifcfg_monitor); } G_OBJECT_CLASS (sc_plugin_ifcfg_parent_class)->dispose (object); }
static void GObject__dispose (GObject *object) { SCPluginIfupdown *plugin = SC_PLUGIN_IFUPDOWN (object); SCPluginIfupdownPrivate *priv = SC_PLUGIN_IFUPDOWN_GET_PRIVATE (plugin); NMInotifyHelper *inotify_helper = nm_inotify_helper_get (); g_signal_handler_disconnect (inotify_helper, priv->inotify_event_id); if (priv->inotify_system_hostname_wd >= 0) nm_inotify_helper_remove_watch (inotify_helper, priv->inotify_system_hostname_wd); if (priv->well_known_ifaces) g_hash_table_destroy(priv->well_known_ifaces); if (priv->well_known_interfaces) g_hash_table_destroy(priv->well_known_interfaces); if (priv->client) g_object_unref (priv->client); G_OBJECT_CLASS (sc_plugin_ifupdown_parent_class)->dispose (object); }