Re: Signal memory leak.
- From: Karl Nelson <kenelson ece ucdavis edu>
- To: gtk-devel-list redhat com
- cc: kenelson teal ece ucdavis edu, kenelson sequoia ece ucdavis edu, kenelson sequoia ece ucdavis edu
- Subject: Re: Signal memory leak.
- Date: Sun, 09 Jan 2000 09:12:21 -0800
> 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,
handlers->func,
object,
params);
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.)
--Karl
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]