Using ARC, I have a declared property of the following form:
@property (nonatomic, strong) MyClass * instanceName;
I set this property in three places - and I've added breakpoints to all three places.
I reference this property in a number of places.
As I step through my code, the property gets set, and none of the other two places where the property is getting set get called. (As expected).
However, at some point, the value of this property is becoming nil.
I've added a dealloc method to my class, with an NSLog, and a breakpoint - but it never gets called (so it's not like this is getting treated like a zeroing weak reference).
I'm baffled as to why my "strong" property would ever become nil without my causing it to do so.
Any advice would be appreciated.
Thanks
The simple answer is that you are causing it to do so. You simply do not yet know how.
At some point after the ivar has been accessed, it should show up in your debug window with an "i" in front of it. Right-click on it and select "Watch..." You'll get a breakpoint every time the memory is modified.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With