[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtk-devel
Subject:    Re: GBoxed with reference-counted objects
From:       Behdad Esfahbod <behdad () behdad ! org>
Date:       2007-10-30 20:55:25
Message-ID: 1193777725.18888.17.camel () behdad ! behdad ! org
[Download RAW message or body]

On Sat, 2007-10-27 at 08:51 -0400, Phil Lello wrote:
> Hi all,
> 
> I'm implementing a GtkWidget derived widget with a GAsyncQueue as a
> property. GAsyncQueue implements reference counting, but isn't derived
> from GObject. It has been suggested that I wrap this in a GBoxed type,
> and use GParamSpecBoxed.
> 
> If my GBoxedCopyFunc simply increases the reference count, is this what
> people expect from a 'copy'?

There are boxed types in pango that do exactly that.  So I guess it's
ok.

> If not, would it be better to add a parallel to GBoxedXXX, say
> GRefCountedXXX, for non-GObject-derived, reference-counted objects?
> These would then take a GRefCountedRef and GRefCountedUnref. This could
> all be done by #define's, but with the distinction that people would
> know they had access to a shared object, not a private copy.
> 
> Please let me know your thoughts,
> 
> Phil Lello

-- 
behdad
http://behdad.org/

"Those who would give up Essential Liberty to purchase a little
 Temporary Safety, deserve neither Liberty nor Safety."
        -- Benjamin Franklin, 1759



_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic