Re: g_object_ref_sink and GUnowned



Tim Janik wrote:

Just curious, how it will prevent someone from using floating reference in
GObject-not-GUnowned-derived object?


not GInitiallyUnowned derived objects have no floating
reference, so there's nothing there that could be used.

Then I was confused by the following, since "initially" doesn't
mean "always", does it?

- gtk+ >= 2.8.10 + glib >= 2.10,
 GObject is initially non floating;
 GObject offers floating API:
   g_object_is_floating(), g_object_ref_sink(), g_object_force_floating()

But well, all I need is to know that GtkTreeModel will not have floating
reference and I don't need to check docs or sources to know whether I
should sink it or not.

Merry Christmas.

And happy new year!

Yevgen




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]