[gst-devel] Recent change in gstregistry.c - FIX

Brett Kosinski brettk at frodo.dyn.gno.org
Mon Nov 17 08:23:35 CET 2003


> > Dave said that the value was being *copied* if it was of type GstPlugin
> > (or, more general, of fundamental-type GBoxed). Assuming this is true,
> > how do we prevent that?
>
> We prevent that by using a G_TYPE_POINTER. GstPlugin is something that
> definitely should not be boxed. A boxed type is something that can be
> copied and each copy can be freed individually. Which is not true for

Err, is this really true?  Take the GClosure in Glib, and if you have it
handy, check out gboxed.c.  In there, GClosure is registered as a boxed
type, and it's copy and free funcs are actually ref and unref functions
(g_closure_(ref|unref)).  So, the GClosure keeps it's own reference count,
even though it's not a proper GObject.  Is there a reason we can't do the
same sort of thing with GstPlugin?

Brett.





More information about the gstreamer-devel mailing list