Using signal transfer on not-refcounted boxed types is not possible and should not be allowed
As highlighting testing some signals added via !409 (merged), which can emit non-ref counted types such as GStrv or other boxed types is something that cannot be handled without having another type flag, for the way glib signals are currently. In fact:
- When new GValues are created the boxed are copied to a new memory area
- Once the signal has been emitted will be free'd (via unset)
This implies that by doing something like this, we're just leaking the original instance because there's no way to tell glib to basically use take_boxed
and avoid to unset it.
As per this, it would be nice to have some automated way to check this when generating the bindings, but maybe the only possible way is to try to maintain a list of supported GLib boxed types that are refcounted and that can be used with different transfer values.