diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-04-21 13:03:36 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-04-21 13:06:28 +0200 |
commit | 104341b05128407d5d50b3677eedb7bd34eece86 (patch) | |
tree | da237159e0f86f881ff24bc1a4685dac23e1c11d /platform/ios | |
parent | e7bcc0c0205680e8cfc51e63b4028bf8d18a4251 (diff) | |
download | mupdf-104341b05128407d5d50b3677eedb7bd34eece86.tar.xz |
ios: Fix memory leak of outline controller.
Diffstat (limited to 'platform/ios')
-rw-r--r-- | platform/ios/Classes/MuDocumentController.m | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/platform/ios/Classes/MuDocumentController.m b/platform/ios/Classes/MuDocumentController.m index 7c3f292c..1b39e3c1 100644 --- a/platform/ios/Classes/MuDocumentController.m +++ b/platform/ios/Classes/MuDocumentController.m @@ -474,16 +474,13 @@ static void saveDoc(char *current_path, fz_document *doc) - (void) onShowOutline: (id)sender { // rebuild the outline in case the layout has changed - - if (!outline) - [outline release]; - fz_outline *root = fz_load_outline(ctx, doc); if (root) { NSMutableArray *titles = [[NSMutableArray alloc] init]; NSMutableArray *pages = [[NSMutableArray alloc] init]; flattenOutline(titles, pages, root, 0); + [outline release]; if ([titles count]) outline = [[MuOutlineController alloc] initWithTarget: self titles: titles pages: pages]; [titles release]; |