GBoxed with reference-counted objects



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]