Re: Incorrect refcount for gtk_menu_item



Hi,

Emmanuel Briot <briot act-europe fr> writes:

> I have the following problem with a gtk_menu_item that contains a
> gtk_accel_label. I this is considered as a bug, I'll report this in
> bugzilla.
> Sorry I don't have code example, but this is a problem I found in the
> context of a big Ada application and with the GtkAda binding.
>
> When a menu_item is created through gtk_menu_item_new_with_label, its
> total initial refcount is 2 (1 for the widget itself, +1 because the
> accel_label has called gtk_accel_label_set_accel_widget, resulting in an
> extra reference on the menu_item.
>
> If the menu_item is then added to a menu, and finally removed from it,
> the widget is not destroyed.

I had a short look at the code in gtkaccellabel.c and it seems that
the accel_label correctly drops the reference on the accel_widget in
its destroy method.


Sven



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]