Can anyone tell me the difference between [self.property release] and [property release] . I am asking this because in one of the view controller in my application, I am doing [self.property release] and pushing this view controller in to the navigation stack, when I pop this view controller its showing the error EXC_BAD_INSTRUCTION but when i do [property release] everything is working fine…? Can any one tell me where I am going wrong. I am new to iPhone app development.
Can anyone tell me the difference between [self.property release] and [property release] . I
Share
[property release] sends the release message to the property instance variable and is almost certainly what you want to do.
[self.property release] sends the release message to the object returned by self.property. The result of this will depend on whether the property is defined as assign / copy / retain and so basically you are probably releasing a different object to the one that you think you are.