not available in automatic reference counting mode

UncaughtExceptionHandler.m:156:47: 'autorelease' is unavailable: not available in automatic reference counting mode

ARC forbids explicit message send of 'autorelease'

 

[[[[UncaughtExceptionHandler alloc] init] autorelease]

     performSelectorOnMainThread:@selector(handleException:)

     withObject:

     [NSException

      exceptionWithName:UncaughtExceptionHandlerSignalExceptionName

      reason:

      [NSString stringWithFormat:

       NSLocalizedString(@"Signal %d was raised.", nil),

       signal]

      userInfo:

      [NSDictionary

       dictionaryWithObject:[NSNumber numberWithInt:signal]

       forKey:UncaughtExceptionHandlerSignalKey]]

     waitUntilDone:YES];

解决方法:

http://blog.csdn.net/xbl1986/article/details/7216668

posted on 2017-07-06 14:23  洛易  阅读(264)  评论(0编辑  收藏  举报