Re: Pango library seems to be really hard for gobject-introspection?
- Date: Sun, 10 Sep 2017 00:29:34 +0200
- From: Stefan Salewski <mail@xxxxxxxxxxxx>
- Subject: Re: Pango library seems to be really hard for gobject-introspection?
On Sat, 2017-09-09 at 21:46 +0000, Emmanuele Bassi wrote:
> Boxed types use g_boxed_free() to release resources, and
> g_boxed_copy() to copy them:
Yes I know :-)
PangoFontDescription is a boxed type (from Object Hierarchy), and we
shall use pango_font_description_free() for freeing.
Do you suggest just using g_boxed_free() instead?
I don't think that is right?
What I found out in the last few hours at least: Pango data types which
needs a ...destroy() function for freeing seems to be mostly marked
with introspectable="0". So my current impression is, that for all the
data types which I "see" from gobject introspection with transfer-
ownership="full", I have to use ...free() for freeing.
For other data types, which needs ...destroy() I have to manually
create the glue code, when they should be needed at all.
But there are also data types like PangoFontMetrics which may need an
unref instead -- maybe that ones are used internally only.
But pango is really hard to understand. For example
For that we have transfer == none, but we can modify the result, and we
can ref and unref the result. To make it even more complicated there is
gtk-list mailing list