diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2015-01-20 16:02:34 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2015-02-17 16:31:42 +0100 |
commit | 76a09166ddbe5b741f54f0fd203f2135e5b532c3 (patch) | |
tree | e331ba98b1a69ae56ac461341a85624ff61f2d59 /include/mupdf/fitz/document.h | |
parent | b9d11456411907e9add8d91b02d67842990c2952 (diff) | |
download | mupdf-76a09166ddbe5b741f54f0fd203f2135e5b532c3.tar.xz |
Reference count fz_document.
Diffstat (limited to 'include/mupdf/fitz/document.h')
-rw-r--r-- | include/mupdf/fitz/document.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/mupdf/fitz/document.h b/include/mupdf/fitz/document.h index e140bc3f..cc078044 100644 --- a/include/mupdf/fitz/document.h +++ b/include/mupdf/fitz/document.h @@ -42,6 +42,7 @@ typedef void (fz_document_rebind_fn)(fz_document *doc, fz_context *ctx); struct fz_document_s { + int refs; fz_document_close_fn *close; fz_document_needs_password_fn *needs_password; fz_document_authenticate_password_fn *authenticate_password; @@ -113,14 +114,15 @@ fz_document *fz_open_document(fz_context *ctx, const char *filename); fz_document *fz_open_document_with_stream(fz_context *ctx, const char *magic, fz_stream *stream); /* - fz_close_document: Close and free an open document. + fz_drop_document: Release an open document. The resource store in the context associated with fz_document - is emptied, and any allocations for the document are freed. + is emptied, and any allocations for the document are freed when + the last reference is dropped. Does not throw exceptions. */ -void fz_close_document(fz_document *doc); +void fz_drop_document(fz_document *doc); /* fz_needs_password: Check if a document is encrypted with a |