error “Passing address of non-local object to __autoreleasing parameter for write-back”

后端 未结 3 2025
别跟我提以往
别跟我提以往 2020-12-29 03:22

I\'m converting my socket client to ARC:

- (id)initWithHostname:(NSString *)hostname AndPort:(NSInteger)port
{
    if((self = [super init]))
    {
        oB         


        
3条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-29 04:02

    Create two local variables, pass the addresses of them to the the method, then assign their values to the ivars after it returns.

提交回复
热议问题