mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 13:28:03 +02:00
script: Free the surface/font bitmaps.
This commit is contained in:
parent
83d1bd9f37
commit
548092fe8c
1 changed files with 13 additions and 0 deletions
|
|
@ -238,6 +238,16 @@ _bitmap_next_id (struct _bitmap *b,
|
|||
return CAIRO_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static void
|
||||
_bitmap_fini (struct _bitmap *b)
|
||||
{
|
||||
while (b != NULL) {
|
||||
struct _bitmap *next = b->next;
|
||||
free (b);
|
||||
b = next;
|
||||
}
|
||||
}
|
||||
|
||||
static const char *
|
||||
_direction_to_string (cairo_bool_t backward)
|
||||
{
|
||||
|
|
@ -1787,6 +1797,9 @@ _device_destroy (void *abstract_device)
|
|||
assert (status == CAIRO_STATUS_SUCCESS);
|
||||
}
|
||||
|
||||
_bitmap_fini (ctx->surface_id.next);
|
||||
_bitmap_fini (ctx->font_id.next);
|
||||
|
||||
status = _cairo_output_stream_destroy (ctx->stream);
|
||||
|
||||
free (ctx);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue