Discussion:
[cairo] an embarrassing memory leak
Matthias Clasen
2018-01-05 02:03:17 UTC
Permalink
I forgot to free the FT_MM_Var struct in cairo_ft_apply_variations.

Here is a fix:

https://github.com/matthiasclasen/cairo/commit/616fb7a9f2612f6cc3472542a70ba3e8ccf16584
Behdad Esfahbod
2018-01-05 11:49:47 UTC
Permalink
Hah. I didn't know that struct needs to be freed. Thought it's owned by
the FT_Face.
Post by Matthias Clasen
I forgot to free the FT_MM_Var struct in cairo_ft_apply_variations.
https://github.com/matthiasclasen/cairo/commit/
616fb7a9f2612f6cc3472542a70ba3e8ccf16584
--
behdad
http://behdad.org/
Behdad Esfahbod
2018-01-05 11:50:25 UTC
Permalink
Probably should be FT_Free or something?
Post by Matthias Clasen
I forgot to free the FT_MM_Var struct in cairo_ft_apply_variations.
https://github.com/matthiasclasen/cairo/commit/
616fb7a9f2612f6cc3472542a70ba3e8ccf16584
--
behdad
http://behdad.org/
Matthias Clasen
2018-01-05 14:15:58 UTC
Permalink
Post by Behdad Esfahbod
Probably should be FT_Free or something?
The freetype docs say to use free() for FT_MM_Var. Yes, I know,
inconsistent...

Continue reading on narkive:
Loading...