diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/multi-threaded.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/docs/multi-threaded.c b/docs/multi-threaded.c index 6f07b543..15fdcba2 100644 --- a/docs/multi-threaded.c +++ b/docs/multi-threaded.c @@ -96,6 +96,7 @@ renderer(void *data) fprintf(stderr, "thread at page %d rendering!\n", pagenumber); dev = fz_new_draw_device(ctx, &fz_identity, pix); fz_run_display_list(ctx, list, dev, &fz_identity, &bbox, NULL); + fz_close_device(ctx, dev); fz_drop_device(ctx, dev); // This threads context is freed. @@ -212,6 +213,7 @@ int main(int argc, char **argv) dev = fz_new_list_device(ctx, list); fz_run_page(ctx, page, dev, &fz_identity, NULL); + fz_close_device(ctx, dev); fz_drop_device(ctx, dev); // The page is no longer needed, all drawing commands |