What are the reference ownership semantics of ReactiveCocoa?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: When I create a signal and bring it into the scope of a function, its effective retain count is 0 per Cocoa conventions: RACSignal * signal = [ self createSignal ]; When I subscribe to the signal, it retains the subscriber and returns a disposable which, per Cocoa conventions, also has a retain count of zero. RACDisposable * disposable = [ signal subscribeCompleted :^ { doSomethingPossiblyInvolving ( self ); }]; Most of the time, the subscriber will close over and reference self or its ivars or some other part of the enclosing