阅读背景:

ARC:向对象发送nil不会立即调用其dealloc

来源:互联网 

I'm transitioning from manual memory management to ARC and have an issue. Most of the time, I'm performing data load asynchronously by calling performSelectorInBackground in my model classes. The thing is I need to stop any model code execution when model receives nil (release). In non-arc, everything was straightforward - as soon as a user closes the window, its controller starts to deallocate itself and deallocates its model [_myModel release], and so model stops its code execution (data loading) and gets called its dealloc method. I'm transitioning from manual memory management




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: