Re: Signal memory leak.

Tim Janik <> writes:

> On 9 Jan 2000, Havoc Pennington wrote:
> > Tim Janik <> 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).

Well, the fact that connect_object() didn't originally swap the arguments
isn't very relevant here. And the function of connect_object() is 
well described by saying it swaps the object and data arguments that
would be used if the plain gtk_signal_connect() is used.
> so i'm much in favour of the *_data variant over something like *_swapped,
> *_other or *_funky_funk ;)

I'd agree with Havoc that "swapped" seems to describe the function
of this well, while "data" says nothing to me. 


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