xcode 5编译NSAutoreleasePool的问题

原创
2014/01/25 20:23
阅读数 278

//5的写法
    /*
    @autoreleasepool {
        
        // insert code here...
        NSLog(@"Hello, World!");
        
    }
     */
    
    //4的写法
    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
    
    NSLog(@"Hello, Wolrd");
    
    [pool drain];
    return 0;



如果需要编译xcode4的写法,需要修改编译环境。

需要设置Object-C Automatic Reference Counting值为No

展开阅读全文
加载中
点击引领话题📣 发布并加入讨论🔥
0 评论
1 收藏
0
分享
返回顶部
顶部