Re: Signal memory leak.

> connect_object is a misnomer -- the `slot_object' may not be
> a gtkobject at all... comments in gtksignal.c explicitly allow
> this.  The intent of connect_object is to switch the user_data
> and object minimize the number of dummy functions.  (see the
> api docs for an example)  I guess compatibility demands that
> the slotobject to remain a gtkobject instead of a gpointer... sigh...

No, it actually must be a GtkObject because it will be cast to one
on the call.

                /* don't cast with GTK_OBJECT () */
                (* signal->marshaller) ((GtkObject*) handlers->func_data,

I guess I just don't understand why there was such a distinction.  
gtk_connect_object seems dangerous and outdated.  While alive
would seem that the more appropriate behavior. 

Thanks for the clarification.  (BTW SigC has the same concept but
it is called connect to class rather than object so that the user
knows it is outside the object system.)


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