- // Hold a reference to keep control alive until DoInsertTool() is
- // called, or if RemoveTool() is called (see DoDeleteTool)
- g_object_ref(control->m_widget);
- // release reference when gtk_widget_destroy() is called on control
- g_signal_connect(
- control->m_widget, "destroy", G_CALLBACK(g_object_unref), NULL);