In Xcode while releasing the object in dealloc method by like [self.object release] this line is shown as memory leak using static code analyzer but it not showing as leak while running instruments.
Here my question is what is the different BWN [self.object release] and just [object release]
Please clarify this,
Thanks in advance.
self.objectactually calls the getter method ([self object]), which returns the instance variableobject(or depending how is synthesized), but the instance variable actually holds the retained object, so you must do[object release]. It’s good practice to synthesize your properties with:@synthesize object = _objectso you don’t get confused of the property and the instance variable – your property will beself.object, but the instance variable will be_objectand you will call[_object release];