Re: GObject reference counting / lack of "sink" issue



On Fri, 2005-09-30 at 01:38 +0200, Tim Janik wrote:

(snip)

> so for a change, i'd like to suggest introducing extra API (and do some slight
> deprecations) for this and apprechiate people's comments on it:
> 
> /* ref() and clear floating flag (#1) */
> GObject*    g_object_ref_sink       (GObject *object);
> 
> /* figure whether floating flag is set */
> gboolean    g_object_is_floating    (GObject *object);
> 
> /* intended for object implementations only, sets the floating flag */
> void        g_object_force_floating (GObject *object);

(more API details snipped)


Better a late response than none at all...

I would very much appreciate such an API for GObject. GIMP is one of the
examples that contain a 1:1 copy of GtkObject's "floating" feature.
Having it in GObject would allow us (and probably many other projects)
to get rid of this code duplication.

ciao,
--mitch




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