我有一个这样声明的 NSString :
。H:
@interface ViewController : UIViewController
{
NSString * aString;
}
@property(nonatomic,copy)NSString *aString;
.m:
@synthesize aString;
......
aString=[[NSString alloc]init];
aString=@"Hello World";
NSLog(@"%@",aString);//The app crashes here
应用程序因此堆栈跟踪而崩溃:
-[CFString respondsToSelector:]: message sent to deallocated instance