From 1d2dfa7eb1cb98cc546d92818e4189a3760cc6c8 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Fri, 16 Sep 2016 16:34:36 +0100 Subject: Call Memento_fin in java Document_destroy(). As reasonable a place to call it as we can hope for. If we ever have 2 documents open and we close 1 then it will dump more blocks than we like, but when we get to that stage we can worry about it then. --- platform/java/mupdf_native.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'platform/java') diff --git a/platform/java/mupdf_native.c b/platform/java/mupdf_native.c index 5723f4de..4cde7807 100644 --- a/platform/java/mupdf_native.c +++ b/platform/java/mupdf_native.c @@ -3845,6 +3845,9 @@ FUN(Document_finalize)(JNIEnv *env, jobject self) if (!ctx || !doc) return; fz_drop_document(ctx, doc); + + /* This is a reasonable place to call Memento. */ + Memento_fin(); } JNIEXPORT jlong JNICALL -- cgit v1.2.3