mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-23 20:35:42 +02:00
particle/string: free glyphs and clusters in destroy()
This commit is contained in:
parent
5a0d192ec1
commit
498a3e3d78
1 changed files with 6 additions and 3 deletions
|
@ -31,7 +31,13 @@ static void
|
||||||
exposable_destroy(struct exposable *exposable)
|
exposable_destroy(struct exposable *exposable)
|
||||||
{
|
{
|
||||||
struct eprivate *e = exposable->private;
|
struct eprivate *e = exposable->private;
|
||||||
|
|
||||||
free(e->text);
|
free(e->text);
|
||||||
|
if (e->glyphs != NULL)
|
||||||
|
cairo_glyph_free(e->glyphs);
|
||||||
|
if (e->clusters != NULL)
|
||||||
|
cairo_text_cluster_free(e->clusters);
|
||||||
|
|
||||||
free(e);
|
free(e);
|
||||||
exposable_default_destroy(exposable);
|
exposable_default_destroy(exposable);
|
||||||
}
|
}
|
||||||
|
@ -95,9 +101,6 @@ expose(const struct exposable *exposable, cairo_t *cr, int x, int y, int height)
|
||||||
cairo_show_text_glyphs(
|
cairo_show_text_glyphs(
|
||||||
cr, e->text, -1, e->glyphs, e->num_glyphs,
|
cr, e->text, -1, e->glyphs, e->num_glyphs,
|
||||||
e->clusters, e->num_clusters, e->cluster_flags);
|
e->clusters, e->num_clusters, e->cluster_flags);
|
||||||
|
|
||||||
cairo_glyph_free(e->glyphs);
|
|
||||||
cairo_text_cluster_free(e->clusters);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct exposable *
|
static struct exposable *
|
||||||
|
|
Loading…
Add table
Reference in a new issue