I want to know what is difference between self.object and self->object? how can we able to release memory in ARC using self?
I want to know what is difference between self.object and self->object ? how can
Share
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.
selfis a pointer, soself->objectcorrectly referencesobject.self.objecthowever is Objective-C syntactic sugar for[self object]and will call the getter method (-(Object *)object) (or the setter method[self setObject:]if you are assigning).If you are using ARC then you don’t explicitly need to do anything to release memory.