标签:
-(void)test{
NSObject * person;
NSLog(@"1:%@",person);
[self initPerson:person];
NSLog(@"2:%@",person);
}
-(void)initPerson:(NSObject *)person{
if (person == nil) {
person = [[NSObject alloc]init];
}
}
结果:1: (null)
2: (null)
标签:
原文地址:http://www.cnblogs.com/peaceWang/p/4647583.html