Invalid use of g_boxed functions in SDPMessage
As discovered in gst-plugins-base!999 (comment 746236) it turns out that SDPMessage
uses boxed copy/free even though specific functions exist (gst_sdp_message_copy/free
). It seems invalid to copy and free this record verbatim anyway.
However, that's what was generated by gir
previously before this got migrated over to a manual file.
@slomo Suggested these copy functions might have been introduced later, with which he might mean handling of those in gir
? The original bindings with g_boxed_copy
were introduced about 2 years ago but copy and free exist for about 7 years.
This likely has to be fixed but follows the question: is the heuristic of having just get_type
to get AutoBoxed
correct? gst-plugins-base!999 (merged) adds get_type
for a bunch of minobjects, turning these (incorrectly) into boxed types. Suddenly all sense of lifetime, ownership and cleanup is gone.
Finally, one actionable change is to remove the use_boxed_types
property from gir
which is:
- Unused (after above linked patch);
- Requires
get_type
(and is implied if that but not the other functions are available); - Is hence only useful to force usage of
g_boxed_copy/free
even if(un)ref
orcopy/free
are available: the first paragraph of this issue asks whether that's completely invalid...