diff options
author | Robin Watts <robin.watts@artifex.com> | 2016-03-28 13:13:31 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2016-03-28 13:16:43 +0100 |
commit | 1273dbd57ada42420cecf961599e74661e0c7066 (patch) | |
tree | 5eea90c86a3868c597dc8d17eaba560991623926 /include/mupdf/memento.h | |
parent | 588b69ccc185f9c108228c298426e42aac2d2967 (diff) | |
download | mupdf-1273dbd57ada42420cecf961599e74661e0c7066.tar.xz |
Memento: Add facility to cope with 'known' leaked blocks.
Harfbuzz allocates blocks that it keeps around as statics.
There are a finite number of these, and they are never freed
(at least not in the build we use). Having Memento report
them as leaks is a pain.
So we extend Memento so that we can label blocks as being
leaks, and thus never have to be bothered by them.
Diffstat (limited to 'include/mupdf/memento.h')
-rw-r--r-- | include/mupdf/memento.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/mupdf/memento.h b/include/mupdf/memento.h index e2ea3562..b6d2c8f7 100644 --- a/include/mupdf/memento.h +++ b/include/mupdf/memento.h @@ -226,6 +226,9 @@ void *Memento_takeRef(void *blk); void *Memento_dropRef(void *blk); void *Memento_reference(void *blk); +void Memento_startLeaking(void); +void Memento_stopLeaking(void); + #ifdef MEMENTO #ifndef COMPILING_MEMENTO_C @@ -265,6 +268,8 @@ void *Memento_reference(void *blk); #define Memento_takeRef(A) (A) #define Memento_dropRef(A) (A) #define Memento_reference(A) (A) +#define Memento_startLeaking() do {} while (0) +#define Memento_stopLeaking() do {} while (0) #endif /* MEMENTO */ |