Re: [evolution-patches] Bonobo Ref Counting Patches



On Tue, 2003-05-13 at 12:33, Dan Winship wrote:
> I was skimming the changes to figure out if I need to do anything in
> Connector and noticed a few things.

These changes should mostly affect gui views.

> > +++ cal-client/cal-client.c     13 May 2003 15:51:10 -0000
> > @@ -428,6 +428,7 @@
> >         /* The server unrefs the query listener, so we just NULL it
> > out here */
> >         if (priv->listener) {
> >                 cal_listener_stop_notification (priv->listener);
> > +               bonobo_object_unref (priv->listener);
> >                 priv->listener = NULL;
> >         }
> 
> The comment is now wrong. (Or more likely, "was always wrong". :-)

Probably always wrong.

> > -       g_signal_connect (cal_table->invisible, "destroy",
> > -                         G_CALLBACK (invisible_destroyed),
> > cal_table);
> > +       g_signal_connect_after (cal_table->invisible, "destroy",
> > +                               G_CALLBACK (invisible_destroyed),
> > cal_table);
> 
> Do these still do anything or are they just remnants of earlier attempts
> to fix? (Why does it matter if you NULL the variables before or after
> the object is completely destroyed?)

I'm not sure - I'm not too clear on how the old invisible clipboard
stuff worked, perhaps using weak pointer refs is a cleaner idea. 
connect and connect_after likely don't make much of a difference.
The only thing i'm unclear on is if there is another way for the
invisible object to be destroyed (i don't *think* so, but i'm not
positive).  Because I was uncertain I kept it the same.

-JP
-- 
JP Rosevear <jpr ximian com>
Ximian, Inc.




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