diff options
Diffstat (limited to 'ios')
-rw-r--r-- | ios/MuPDF.xcodeproj/project.pbxproj | 4 | ||||
-rw-r--r-- | ios/main.m | 36 |
2 files changed, 21 insertions, 19 deletions
diff --git a/ios/MuPDF.xcodeproj/project.pbxproj b/ios/MuPDF.xcodeproj/project.pbxproj index 7655aff2..13ddbc82 100644 --- a/ios/MuPDF.xcodeproj/project.pbxproj +++ b/ios/MuPDF.xcodeproj/project.pbxproj @@ -246,7 +246,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ..; INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 4.0; + IPHONEOS_DEPLOYMENT_TARGET = 4.3; LIBRARY_SEARCH_PATHS = "$(inherited)"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; @@ -273,7 +273,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ..; INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 4.0; + IPHONEOS_DEPLOYMENT_TARGET = 4.3; LIBRARY_SEARCH_PATHS = "$(inherited)"; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -319,7 +319,6 @@ static UIImage *renderPage(pdf_xref *xref, int number, CGSize screen) - (void) dealloc { - [target release]; [titles release]; [pages release]; [super dealloc]; @@ -469,6 +468,7 @@ static UIImage *renderPage(pdf_xref *xref, int number, CGSize screen) [self setToolbarItems: [NSArray arrayWithObjects: wrapper, nil]]; [self setView: view]; + [view release]; } - (void) viewWillAppear: (BOOL)animated @@ -504,26 +504,28 @@ static UIImage *renderPage(pdf_xref *xref, int number, CGSize screen) [[self navigationController] setToolbarHidden: YES animated: animated]; } -- (void) dealloc +- (void) viewDidUnload { - if (xref) - for (int i = 0; i < pdf_count_pages(xref); i++) - if (pageviews[i]) - [pageviews[i] release]; + for (int i = 0; i < pdf_count_pages(xref); i++) { + if (pageviews[i]) { + [pageviews[i] release]; + pageviews[i] = nil; + } + } - pdf_xref *self_xref = xref; // don't use self after dealloc has finished - dispatch_async(queue, ^{ - printf("close xref\n"); - if (self_xref) - pdf_free_xref(self_xref); - }); + [indicator release]; indicator = nil; + [slider release]; slider = nil; + [wrapper release]; wrapper = nil; + [canvas release]; canvas = nil; +} +- (void) dealloc +{ + if (xref) { + printf("close xref\n"); + pdf_free_xref(xref); + } free(pageviews); - - [indicator release]; - [slider release]; - [wrapper release]; - [canvas release]; [outline release]; [key release]; [super dealloc]; |