GBoxed with reference-counted objects
- From: Phil Lello <phil lello googlemail com>
- To: Gtk Developer List <gtk-devel-list gnome org>
- Subject: GBoxed with reference-counted objects
- Date: Thu, 25 Oct 2007 14:53:28 +0100
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'?
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]