I wonder why the retaincount of an object equal one inside its dealloc function .
-(void) dealloc
{
NSlog(@"retain count = %i ", [self retaincount]);
[super dealloc];
}
retain count = 1 so how the object called its dealloc function although its retain count equal 1 . As I know the object calls this function when its retain count is equal zero only .
Because the retain count of an object can never be zero.
Decrementing it to zero is a waste of cycles because the object will b deallocated anyway. retainCount can never return 0.
And:
retainCount is useless. Do not call it.
Several ways;