mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
bugfix: get rid of memory leak in koptreader
Memory leak came from the master bitmap that is reused in each reflow. But the bitmap width and height were not set to zero when bitmap was freed. When the master bitmap was enlarged in some cases the size of the master bitmap would increase monotonically. This patch fixes this issue by setting master bitmap width and height to zero at the beginning of each reflow. And a memeory usage logger is added in koptreader.
This commit is contained in: