You enabled ARC in build settings but your code is not ready to use Automatic Reference Counting. If you use ARC you can’t get to autorelease pools directly. You must use @autoreleasepool blocks instead:
// For example:
#if __has_feature(objc_arc)
self.window = [[UIWindow alloc] initWithFrame:screenBounds];
#else
self.window = [[[UIWindow alloc] initWithFrame:screenBounds] autorelease];
#endif
#if __has_feature(objc_arc)
self.window = [[UIWindow alloc] initWithFrame:screenBounds];
#else
self.window = [[[UIWindow alloc] initWithFrame:screenBounds] autorelease];
#endif
int main(int argc, char *argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate");
[pool release];
return retVal;
}
// With ARC replace it with such a code:
int main (int argc, char * argv[]) {
int retVal;
@autoreleasepool {
retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate");
}
return retVal;
}