summaryrefslogtreecommitdiff
path: root/source/fitz
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-09-14 18:02:35 +0100
committerRobin Watts <robin.watts@artifex.com>2016-09-14 19:53:35 +0100
commitf66bcef797ad732c294ffc8168bbfe50e86ffca7 (patch)
tree94cef5817e7c8049d5b86ffd4d6cc88d39832475 /source/fitz
parentd096489bffad5da0975ed7ccc915310591caae69 (diff)
downloadmupdf-f66bcef797ad732c294ffc8168bbfe50e86ffca7.tar.xz
Don't report addRef/dropRef events to Memento twice.
We call Memento_addRef etc in fz_keep_impXX functions, so don't call them in the callers too.
Diffstat (limited to 'source/fitz')
-rw-r--r--source/fitz/store.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/source/fitz/store.c b/source/fitz/store.c
index f8feb591..cad027bc 100644
--- a/source/fitz/store.c
+++ b/source/fitz/store.c
@@ -60,8 +60,6 @@ fz_keep_storable(fz_context *ctx, const fz_storable *sc)
* sanely throughout the code. */
fz_storable *s = (fz_storable *)sc;
- if (s && s->refs > 0)
- (void)Memento_takeRef(s);
return fz_keep_imp(ctx, s, &s->refs);
}
@@ -79,8 +77,6 @@ fz_drop_storable(fz_context *ctx, const fz_storable *sc)
this method. So we can simply drop the storable object
itself without any operations on the fz_store.
*/
- if (s && s->refs > 0)
- (void)Memento_dropRef(s);
if (fz_drop_imp(ctx, s, &s->refs))
s->drop(ctx, s);
}