Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Not really sure the
fz_drop_colorspace()
are really needed (or they are small datastructures that we don't see growing), but it seems logical, and they don't seem to hurt.But the
FIXME: undefined pixmap
, whick feels like a typo, looks like there werepix
there never freed - but if that was the case, we should have seen big memory leaks (at least people who read pdf, which I rarely do).I've been trying to understand and hunt possible memory leaks with the html dictionary, where I see a huge grow in mem use when used - but may be it's not unlimited. On the emulator, with mupdf.lua
debug_memory = true
, it seems it grows quickly to +30Mb, but then try to stays at around 30/35.I didn't find any such 30/32/35/256<<17 in MuPDF sources, so I don't know where that is made out and ensured...
On my Kobo, memory seems to grow quickly from 30Mb to 70/100MB, and then may grow less quickly,
So, it may be the same thing as observed on the emulaor - lua objects stacked up at the end of memory, make it grows slowly, and the big mupdf cache(?) is not released, which should be ok.