Re: GtkWindow destroy problem
- From: Darin Adler <darin bentspoon com>
- To: Tim Janik <timj gtk org>
- Cc: Havoc Pennington <hp redhat com>, Martin Baulig <martin home-of-linux org>, Gtk Developers <gtk-devel-list gnome org>
- Subject: Re: GtkWindow destroy problem
- Date: Fri, 07 Sep 2001 09:55:54 -0700
on 9/7/01 9:58 AM, Tim Janik at timj gtk org wrote:
> but if you use GtkObject in a normally refcounted framework other than the
> gtk widget framework, you should be able to simply do
> o = gtk_object_new (GTK_TYPE_OBJECT, NULL);
> gtk_object_unref (o);
> and ignore the gtk specific floating kludge.
That's what I thought when I started working with Gtk, but after asking lots
of questions and learning the framework better, I've learned to always doing
a sink and ref (often in the initialize function) for objects where I am not
using the floating feature, rather than relying on the knowledge that no one
will do a sink. Now I learn that you would rather than I didn't do it that
way -- something new every day!
As you say, though, with GObject this fine point becomes much less
important.
-- Darin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]