【发布时间】:2011-10-19 01:28:52
【问题描述】:
假设创建了一个启用了 ARC 的新项目
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
以及下面的声明
@property (nonatomic) NSString *classDescription;
为什么会
@synthesize classDescription;
出错了
"Existing ivar 'classDescription' for unsafe_unretained propery 'classDescription must be _unsafe_unretained"
我认为 Xcode 4.2 版不需要保留,需要发布。这不正确吗?
请澄清
【问题讨论】:
-
ARC 是否会使 NSString 属性上的
copy修饰符过时?
标签: objective-c memory-management xcode4.2