object reference is same in function calling

后端 未结 3 1547
独厮守ぢ
独厮守ぢ 2021-01-26 01:06
 -(UserDetail *)functionCheck :(NSString *)str
 {
    UserDetail *d2=[[UserDetail alloc] init];
    NSLog(@\"check address::::::> %p\",&d2);
    d2.auth_token=str         


        
3条回答
  •  悲&欢浪女
    2021-01-26 01:59

    If you are in NON-ARC environment, replace your return statement of the function with return [d2 autorelease]. On ARC, you don't need to do anything.

提交回复
热议问题