summaryrefslogtreecommitdiff
path: root/platform/windows/mupdfwinrt/Cache.cpp
diff options
context:
space:
mode:
authorMichael Vrhel <michael.vrhel@artifex.com>2015-01-15 13:41:06 -0800
committerMichael Vrhel <michael.vrhel@artifex.com>2015-01-20 11:38:00 -0800
commitfc05b51c2b198dcc5553f6de1b8fb0e22e7d28ae (patch)
tree4ac3d618db05c3d9d140c9d5d22a09ecd9efcc89 /platform/windows/mupdfwinrt/Cache.cpp
parentd4ab3cb0b857699c523272bb192752041c77e5e7 (diff)
downloadmupdf-fc05b51c2b198dcc5553f6de1b8fb0e22e7d28ae.tar.xz
Fix reference counting of display lists in Cache.cpp
Fred Ross-Perry found some issues with the display list counting. This fixes the problems. Also he found a spot where we should have been doing just the page contents as opposed to the page.
Diffstat (limited to 'platform/windows/mupdfwinrt/Cache.cpp')
-rw-r--r--platform/windows/mupdfwinrt/Cache.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/platform/windows/mupdfwinrt/Cache.cpp b/platform/windows/mupdfwinrt/Cache.cpp
index b129710f..d2567bc2 100644
--- a/platform/windows/mupdfwinrt/Cache.cpp
+++ b/platform/windows/mupdfwinrt/Cache.cpp
@@ -22,7 +22,6 @@ void Cache::Empty(fz_context *mu_ctx)
cache_entry_t *old_entry = curr_entry;
curr_entry = old_entry->next;
fz_drop_display_list(mu_ctx, old_entry->dlist);
-
delete old_entry;
}
this->size = 0;
@@ -76,8 +75,6 @@ void Cache::Add(int value, int width_in, int height_in, fz_display_list *dlist,
head = new_entry;
}
size++;
- /* We are going to use this item now */
- fz_keep_display_list(mu_ctx, new_entry->dlist);
}
fz_display_list* Cache::Use(int value, int *width_out, int *height_out, fz_context *mu_ctx)
@@ -93,7 +90,6 @@ fz_display_list* Cache::Use(int value, int *width_out, int *height_out, fz_conte
}
if (curr_entry != NULL)
{
- fz_keep_display_list(mu_ctx, curr_entry->dlist);
/* Move this to the front */
if (curr_entry != head)
{