相关疑难解决方法(0)

手动保留ARC

在ARC之前,我有以下代码在异步操作正在进行时保留委托:

- (void)startAsyncWork
{
    [_delegate retain];
    // calls executeAsyncWork asynchronously
}

- (void)executeAsyncWork
{
    // when finished, calls stopAsyncWork
}

- (void)stopAsyncWork
{
    [_delegate release];
}
Run Code Online (Sandbox Code Playgroud)

ARC的这种模式相当于什么?

memory-management objective-c ios ios5 automatic-ref-counting

24
推荐指数
2
解决办法
8952
查看次数