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 /platform | |
parent | b9d11456411907e9add8d91b02d67842990c2952 (diff) | |
download | mupdf-76a09166ddbe5b741f54f0fd203f2135e5b532c3.tar.xz |
Reference count fz_document.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/android/jni/mupdf.c | 6 | ||||
-rw-r--r-- | platform/ios/Classes/MuDocRef.m | 4 | ||||
-rw-r--r-- | platform/x11/pdfapp.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/platform/android/jni/mupdf.c b/platform/android/jni/mupdf.c index 21c7bbb5..1b2b6e2f 100644 --- a/platform/android/jni/mupdf.c +++ b/platform/android/jni/mupdf.c @@ -330,7 +330,7 @@ JNI_FN(MuPDFCore_openFile)(JNIEnv * env, jobject thiz, jstring jfilename) fz_catch(ctx) { LOGE("Failed: %s", ctx->error->message); - fz_close_document(glo->doc); + fz_drop_document(glo->doc); glo->doc = NULL; fz_free_context(ctx); glo->ctx = NULL; @@ -484,7 +484,7 @@ JNI_FN(MuPDFCore_openBuffer)(JNIEnv * env, jobject thiz, jstring jmagic) fz_catch(ctx) { LOGE("Failed: %s", ctx->error->message); - fz_close_document(glo->doc); + fz_drop_document(glo->doc); glo->doc = NULL; fz_free_context(ctx); glo->ctx = NULL; @@ -1718,7 +1718,7 @@ static void close_doc(globals *glo) alerts_fin(glo); - fz_close_document(glo->doc); + fz_drop_document(glo->doc); glo->doc = NULL; } diff --git a/platform/ios/Classes/MuDocRef.m b/platform/ios/Classes/MuDocRef.m index bd2b87c0..44337dc0 100644 --- a/platform/ios/Classes/MuDocRef.m +++ b/platform/ios/Classes/MuDocRef.m @@ -33,7 +33,7 @@ if (self) { if (doc != NULL) - fz_close_document(doc); + fz_drop_document(doc); [self release]; self = nil; } @@ -46,7 +46,7 @@ { __block fz_document *block_doc = doc; dispatch_async(queue, ^{ - fz_close_document(block_doc); + fz_drop_document(block_doc); }); [super dealloc]; } diff --git a/platform/x11/pdfapp.c b/platform/x11/pdfapp.c index 4f05a496..7ce52e9e 100644 --- a/platform/x11/pdfapp.c +++ b/platform/x11/pdfapp.c @@ -401,7 +401,7 @@ void pdfapp_close(pdfapp_t *app) fz_free_page(app->doc, app->page); app->page = NULL; - fz_close_document(app->doc); + fz_drop_document(app->doc); app->doc = NULL; #ifdef HAVE_CURL |