didSet for weak reference not working as expected
didSet
and willSet
are not called when a weak-reference is auto-zeroed due to ARC.
If you were to manually set the property to nil
, you would see the didSet
code called.
didSet
and willSet
are not called when a weak-reference is auto-zeroed due to ARC.
If you were to manually set the property to nil
, you would see the didSet
code called.