Skip to content

function: Do not leak strings returned by transfer-none trampolines

When a VFunc or a callback returns a transfer-none string we were breaking the introspection because it was causing a leak.

Now, in case these strings are returned by vfunc's of an object, we can just safely associate them to the object using qdata, while in case we're handling a callback we can use GLib internal strings to hold these strings just once in memory. While this is technically still a waste we're leaking just once, so it shouldn't be a big deal.

Closes: #519 (closed)

Merge request reports