Re: Signal memory leak.



On 9 Jan 2000, Havoc Pennington wrote:

> Tim Janik <timj@gtk.org> writes: 
> > you're completely right, in fact i alread have a rename
> > of that function on my TODO list for 1.4. unfortunately
> > we will have to stay backwards compatible, so it'll
> > probably amount to
> > 
> > guint gtk_signal_connect_data (GtkObject    *object,
> >                                const gchar  *signal,
> >                                GtkSignalFunc func,
> >                                gpointer      data);
> 
> connect_swapped() or something is a better name, after all the regular
> _connect() also has data, data is simply not the distinguishing
> feature of this function. :-)

nope, but imho, the important point here is that the `data' member will
be passed in as the object to `func', and the main intent is to use
this for connections like

gtk_signal_connect (button, "clicked", gtk_widget_hide, window);

where `data' is the sole action taking member for the resulting function call.

that the `object' and the `data' arguments are merely swapped to achive this
effect is actually an implementation "feature" (and doesn't even steem from
the original implementation of the signal system).

so i'm much in favour of the *_data variant over something like *_swapped,
*_other or *_funky_funk ;)

> 
> Havoc
> 

---
ciaoTJ



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