From 2692594408fb814863890dad468431b641e6913e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Luthi?= Date: Thu, 5 Aug 2010 10:38:15 +0200 Subject: [PATCH] Fix NSAutoreleaseNoPool warnings --- main.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.m b/main.m index 0bf4899..4c2034e 100644 --- a/main.m +++ b/main.m @@ -16,12 +16,13 @@ CGFloat UIScreen_scale(id self, SEL _cmd) int main(int argc, char *argv[]) { + NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; + // -[UIView alpha] has the same method signature as -[UIScreen scale] Method alpha = class_getInstanceMethod([UIView class], @selector(alpha)); if (![UIScreen instancesRespondToSelector:@selector(scale)]) class_addMethod([UIScreen class], @selector(scale), (IMP)UIScreen_scale, method_getTypeEncoding(alpha)); - - NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; + int retVal = UIApplicationMain(argc, argv, nil, nil); [pool release]; return retVal;