If I am using synthesized properties, then why wouldn't I simply say :
self.property = nil;
This will release the ref count, and make sure I don't have a dangling pointer.
Seems straightforward, and yet 99% of code I see seems to do it this way:
[property release];
property = nil;
and yes, in most cases they are properties.
I get the horrible feeling I am missing something?
Sorta like when I forgot to put "self." in front of some of the properties and wondered why it was crashing :-)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…