Re: GtkCellRenderer.t failure.



On Sun, 2004-02-01 at 14:00, muppet wrote:
On Sunday, February 1, 2004, at 11:14 AM, Ross McFarland wrote:

which versions of everything are you using?  i've seen this on some 
combinations, usually if you don't actually add any signals or 
properties to the derived type (add_signals in GType.xs calls ref on 
the type).

stock rh9, gtk2-perl HEAD

i don't think the change to ref actually hurts anything; the leaked 
class ref is not a problem in practice, since perl does not let classes 
go away once they've been defined.  it may be problematic for embedded 
situations, but we'll burn that bridge when we're standing on it.

what about something like:

/* peek should suffice, as the bindings should keep this class
 * alive for us. */
class = g_type_class_peek (gtype);
if (! class)
{
        class = g_type_class_ref (gtype);
        if (! class)
                croak ("internal problem: can't peek at type class "
                       "for %s(%d)", g_type_name (gtype), gtype);
}
gtk2perl_cell_renderer_class_init (class);

would seem to try to catch and handle the case i'm seeing, without added
an extra unwanted ref to the class.

-rm




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