GNOME Bugzilla – Bug 657367
GtkAction: Hold a reference to proxy widgets
Last modified: 2012-03-21 15:32:07 UTC
Previously we expect that a proxy widget holds a reference to the action via gtk_activatable_do_set_related_action(). However, it is possible for the widget to still be in a floating state when it adds itself to the the action. This is a problem when gtk_action_get_proxies() gets called, because we return floating objects back to the user. And language bindings aren't going to be expecting that. Fix this by calling ref_sink() and unref().
Created attachment 194737 [details] [review] GtkAction: Hold a reference to proxy widgets
AFAICS there is also another partly related issue - private_data->proxies seem to leak when the action with proxies is destroyed. However, I'm not sure whether all proxies aren't disconnected by some other means.
Review of attachment 194737 [details] [review]: ::: gtk/gtkaction.c @@ +728,3 @@ + g_object_ref_sink (priv->gobj); + g_object_ref_sink (proxy) instead?
Review of attachment 194737 [details] [review]: Setting patch status. Colin - any reply to the comment ?
Attachment 194737 [details] pushed as 06307dd - GtkAction: Hold a reference to proxy widgets
See also https://bugzilla.gnome.org/show_bug.cgi?id=672465