Replaced some NSAutoreleasepool with @autoreleasepool.

This commit is contained in:
Damiano Galassi committed 2014-10-23 14:23:41 +02:00
1 parent 22436fa661
commit e2292ba6f4
2 files changed
+4 -5

No files matched your search

+2 -2
View File
@@ -361,7 +361,7 @@
if (![_workingTracks count])
return;
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
@autoreleasepool {
NSMutableArray *trackImportersArray = [[NSMutableArray alloc] init];
NSUInteger done = 0, update = 0;
CGFloat progress = 0;
@@ -438,7 +438,7 @@
}
[trackImportersArray release];
[pool release];
}
}
- (void)cancel
+2 -3
View File
@@ -17,7 +17,7 @@ using namespace tesseract;
class OCRWrapper {
public:
OCRWrapper(const char *lang, const char *base_path) {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
@autoreleasepool {
NSString *path = nil;
if (base_path)
path = [[NSString stringWithUTF8String:base_path] stringByAppendingString:@"/"];
@@ -29,8 +29,7 @@ public:
path = [path stringByAppendingString:@"tessdata/"];
tess_base_api.Init([path UTF8String], lang, OEM_DEFAULT);
[pool release];
}
}
char * OCRFrame(const unsigned char *image, size_t bytes_per_pixel, size_t bytes_per_line, size_t width, size_t height) {