Yesterday I found that I needed to add self to an object as it was causing a problem.
I’ve been adding self to a few other objects today, it compiles and seems to work fine when I do. But I’m wondering if maybe I shouldn’t be always adding self ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you have an ivar that is backing a property
myFoo, thenself.myFoorwill use the property, whereasmyFoodirectly will not.For example with this property:
self.myFoo = temp;will retain tempmyFoo = temp;will not retain temp