Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/iphone
diff options
context:
space:
mode:
authorKirill Zhdanovich <kzhdanovich@gmail.com>2013-06-03 17:30:02 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:56:08 +0300
commitf351682a71bdc3c0ea3669507946e5eab0168b97 (patch)
treee9f80c03989b93fdc0d3f3b351c7735269280e73 /iphone
parent5a36fd2b7791635264bdf90980b57014aa838741 (diff)
[iOS] Now use autorelease block. Code will compile with LLVM 3.0, xCode version >= 4.2.
Diffstat (limited to 'iphone')
-rw-r--r--iphone/Maps/main.mm18
1 files changed, 9 insertions, 9 deletions
diff --git a/iphone/Maps/main.mm b/iphone/Maps/main.mm
index 64144915ae..e72e8f3c33 100644
--- a/iphone/Maps/main.mm
+++ b/iphone/Maps/main.mm
@@ -31,14 +31,14 @@ int main(int argc, char * argv[])
LOG(LINFO, ("MapsWithMe started, detected CPU cores:", GetPlatform().CpuCores()));
NSSetUncaughtExceptionHandler(&exceptionHandler);
-
- NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
-
- Dummy * dummy = [[Dummy alloc] autorelease];
- NSThread * thread = [[[NSThread alloc] initWithTarget:dummy selector:@selector(dummyThread:) object:nil] autorelease];
- [thread start];
-
- int retVal = UIApplicationMain(argc, argv, nil, nil);
- [pool release];
+ int retVal;
+ @autoreleasepool
+ {
+ Dummy * dummy = [[Dummy alloc] autorelease];
+ NSThread * thread = [[[NSThread alloc] initWithTarget:dummy selector:@selector(dummyThread:) object:nil] autorelease];
+ [thread start];
+
+ retVal = UIApplicationMain(argc, argv, nil, nil);
+ }
return retVal;
}