第3月第19天 cxx_destruct dispatch_get_main_queue()死锁

1.

 

http://blog.jobbole.com/65028/

 

2.

- (void)viewDidLoad {
    [super viewDidLoad];

    NSLog(@"1");
    dispatch_sync(dispatch_get_main_queue(), ^{
        NSLog(@"2");
    });
    NSLog(@"3");
}

答案:输出1之后程序死锁

 

http://blog.sunnyxx.com/2014/03/06/ios_exam_0_key/

posted @ 2016-12-19 10:45  lianhuaren  阅读(123)  评论(0编辑  收藏  举报