[Bug 609473] GstMiniObject derived classes could support storing data for bindings

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed Apr 20 08:30:32 PDT 2011


https://bugzilla.gnome.org/show_bug.cgi?id=609473
  GStreamer | gstreamer (core) | git

--- Comment #14 from José Alburquerque <jaalburqu at svn.gnome.org> 2011-04-20 15:30:28 UTC ---
(In reply to comment #13)
> Hmm the main problem I see here is that adding a toggleref will increase the
> refcount by one, which makes the miniobject read-only. Thus you can never ever
> change a miniobject with a toggleref.

I keep forgetting this about mini objects.  In our case, however, we experience
leaking only when taking an existing C instance and wrapping it into a C++
instance.  To do this we take an extra reference and the mini object is not
writable anyway.

However, I guess looking at your initial comments about how to solve this,
another solution I could provide is to allow storing data in the mini object
and possibly a function facilitating the storing of data in the mini object
with the option of providing destroy notification.  With or without the
function (at least in 0.10), gstreamermm can use GstMiniObject's finalize
mechanism to free the data.
> 
> For the flag you could also use the miniobject flags btw.

I guess.  That would mean adding a flag in the GstMiniObjectFlags enum.  I sort
of quickly adapted the code from GObject and didn't stop to think too much.  I
could change that if you still think the patch is worth using.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list