Returned boxed type with (transfer none) should avoid copying the boxed structure
Submitted by Thibault Saunier
Link to original bug (#751166)
Description
This is a follow up of https://bugzilla.gnome.org/show_bug.cgi?id=736896
Basically the idea here is that in the case where we have a (transfer none) getter, we should make sure that the object owning the boxed structure is not destroyed during the lifetime of the structure itself. That can be achieved by adding a python reference to the object to the boxed structure. You can read the description of the problem an explanation of that solution Nicolas Duschene brought in the previously linked bug report: https://bugzilla.gnome.org/show_bug.cgi?id=736896#c27