Fwd: Re: GTK_FLOATING broken in 2.9?



Yes, we do really need the floating reference. There is no reason to discourage 
the code you mentioned when you want to make reusable container objects that 
have a sane API without requiring the caller to do a bunch of work and 
potentially introduce bugs. When you are calling your own code, it is not that 
much to keep track of, but when I write code that is used by 1000 developers it 
is much easier for me to take care of the reference issues inside the API and 
make the large group of unknown developers free from unknowingly creating 
reference counting bugs.

Multiple people that need floating behavior that is not dependent on GTK already
 write their own wrappers, but there is no reason why the underlying object 
framework should not support it natively, as this benefits all users who write 
reusable gobject based APIs.

Andrew Paprocki
Bloomberg LP

----- Original Message -----
From: Federico Mena Quintero  <federico ximian com>
At: 12/14 14:43

On Tue, 2005-12-13 at 16:57 +0100, Tim Janik wrote:
> right, since the floating flag is stored in GObject in 2.9, so altering
> the GtkObject won't have any effect.

>From the point of view of the release team, We Cannot Break Existing
Code(tm).

Do we really need a floating flag in gobject?

We should discourage this:
  Obj *o = obj_new ();
  foo_set_obj (o);
  /* I no longer own the reference to o */

GtkWidget is an old-enough API that we can consider it a special case.

Whether gtkmm does the right thing is debatable.  I'd just like to know
why we need floating references at the glib level.

  Federico

_______________________________________________
gtk-devel-list mailing list
gtk-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list






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