Want to perform action when __weak ivar is niled

前端 未结 3 1783

I have a @class Foo which contains a __weak id bar ivar. Several actions from methods in different classes can cause the object to disappear and th

3条回答
  •  佛祖请我去吃肉
    2021-01-18 03:00

    KVO cannot be successfully used on non-property IVARs.

    You cannot detect from the runtime when Objective-C's ARC nils an IVAR.

提交回复
热议问题