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

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue Apr 26 10:24:30 PDT 2011


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

--- Comment #18 from José Alburquerque <jaalburqu at svn.gnome.org> 2011-04-26 17:24:27 UTC ---
(In reply to comment #17)
> What exactly would be the difference, other than that you don't automatically
> own a real reference? Does this make some use cases impossible?

Not that I can tell.  I think that functionality might be the only difference. 
Suppose, for example, that several toggle references have been added and the
imaginary references become weak (for all of the toggle references) so that the
mini objects reference is zero (I guess).  Then during the toggle reference
notification one of the callbacks wants to preserve the mini object and thus
increases its reference count (would this be an actual use case?).  What
happens with the rest of the callbacks waiting for notification?  Should they
still be notified that the reference became weak?  What if one of the other
callbacks also wants to preserve the mini object and also increases its
reference?  From what I can see, it may be (in this scenario) that there might
be some (endless?) recursion from a possible referencing during toggle
notification (if that's allowed).

If the above use case is invalid then I think it's fine using an approach like
this because all we really want is to be able to free some data when the mini
object looses all its reference and this would work fine for our purposes.

> 
> But sure, this must be documented.

I can update the patch so that the documentation of the functions that add and
remove toggle reference clarify this.

-- 
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