Re: GtkWindow destroy problem



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]