Re: none
- From: Owen Taylor <otaylor redhat com>
- To: gtk-devel-list gnome org
- Subject: Re: none
- Date: 13 Dec 2000 23:17:47 -0500
Maciej Stachowiak <mjs eazel com> writes:
> Tim Janik <timj gtk org> writes:
>
> >
> > i don't know who proposed, that dude must have been on crack,
> > destroy serves a completely different purpose than weak_refs.
> >
>
> They both have the end result of notifying you whent he object is
> destroyed.
>
> > the reason why i didn't implement weak_refs for GObject is that they
> > are extremely rarely used on GtkObject,
>
> Yeah, because the "destroy" signal is so much more convenient.
>
> > and for the rare cases where you can't get away without it, you can
> > still use named data (which is how weak refs are implemented in
> > GObject btw).
>
> That's highly no-obvious and inconvenient. Why make things a pain for
> the user?
If you want weakrefs, and think object data is inconvenient, then
we should spend the two minutes to port:
void gtk_object_weakref (GtkObject *object,
GtkDestroyNotify notify,
gpointer data);
void gtk_object_weakunref (GtkObject *object,
GtkDestroyNotify notify,
gpointer data);
Though note that the only differences between this and
g_object_set_data_full are a) the presence use of a key, and b)
the order of the arguments.
Clarifying that ::destroy is a "disconnect everything" command
rather than notification of the object being freed or going
into a "destroyed" state is a major conceptual win for GTK+-2.0.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]