Re: gtk_signal_emit & refcounting
- From: Jon Trowbridge <trow ximian com>
- To: John Tunison <john tunison net>
- Cc: gtk-devel-list gnome org
- Subject: Re: gtk_signal_emit & refcounting
- Date: 31 Aug 2001 10:36:06 -0500
On Fri, 2001-08-31 at 09:20, John Tunison wrote:
> Out of curiousity, if gtk_signal_emit refs correctly ...
>
> static void
> gtk_signal_real_emit (GtkObject object ...)
> {
> gtk_object_ref (object);
> ...
>
> gtk_object_unref (object);
> }
>
> Why does some code ref and unref, wrapped around a signal emission? (Like gtk_widget_hide, but I've seen it elsewhere too.)
To try to make sure that the object doesn't get destroyed during
the signal emission, leaving gtk+ holding a dangling pointer.
-JT
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]