[Bug 743062] GstObject subclasses sinking instances in instance_init/constructor cause leaks in bindings

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu May 11 10:22:51 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=743062

--- Comment #9 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
What I suggest here is that we sink these in the explicit constructors (the
new() functions), and mark those constructors as "transfer full" (as they give
a non-floating, full reference to the caller).

The new() functions of other classes (that return floating references), should
be "transfer floating" as they are now in a few places already. While "transfer
floating" is not perfectly defined, it's the best we have right now and it maps
to "transfer none" for bindings (which causes them to do the right thing).


(Note: The GObject documentation says bindings *should* not use floating
references and should not expose them, i.e. get rid of the floating references
wherever encountered. As such "transfer none/floating" is causing the correct
behaviour for functions returning floating references, and ref-sinking floating
references as arguments)

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