diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2012-01-11 23:26:49 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2012-01-11 23:26:49 +0100 |
commit | 209f30bee3121bbae32799b0bbb10f5e6db4158c (patch) | |
tree | ba20a47f0bfb0370525a4ee84e98fa136202fc82 /fitz/base_context.c | |
parent | be1ed0692b49bc86ce512edc837fefc601d42443 (diff) | |
download | mupdf-209f30bee3121bbae32799b0bbb10f5e6db4158c.tar.xz |
Hide glyph cache in context.
Diffstat (limited to 'fitz/base_context.c')
-rw-r--r-- | fitz/base_context.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fitz/base_context.c b/fitz/base_context.c index 218ce407..f77d3987 100644 --- a/fitz/base_context.c +++ b/fitz/base_context.c @@ -15,15 +15,21 @@ fz_free_context(fz_context *ctx) return; /* Other finalisation calls go here (in reverse order) */ + fz_free_glyph_cache_context(ctx); fz_free_store_context(ctx); fz_free_aa_context(ctx); fz_free_font_context(ctx); + if (ctx->warn) + { + fz_flush_warnings(ctx); + fz_free(ctx, ctx->warn); + } + if (ctx->error) { assert(ctx->error->top == -1); fz_free(ctx, ctx->error); - fz_free(ctx, ctx->warn); } /* Free the context itself */ @@ -46,6 +52,8 @@ fz_new_context(fz_alloc_context *alloc, unsigned int max_store) memset(ctx, 0, sizeof *ctx); ctx->alloc = alloc; + ctx->glyph_cache = NULL; + ctx->error = fz_malloc_no_throw(ctx, sizeof(fz_error_context)); if (!ctx->error) goto cleanup; |