The nib loading process is slightly (but not very) complicated, and differs between the OSX and iPhone platforms. You can read about this in the Nib Object Life Cycle section of the Resource Programming Guide. In table 1-1 you will find this:
Objects in the nib file are created
with a retain count of 1 and then
autoreleased. As it rebuilds the
object hierarchy, however, UIKit
reestablishes connections between the
objects using the setValue:forKey:
method, which uses the available
setter method or retains the object by
default if no setter method is
available
So what happens is that the cell is created with a retain count of 1, and then when it is set with your synthesized setter, that it increased to 2. When you set your property to nil
the retain count goes down to 1, and the cell is returned to the table view. The table view adds it to its view hierarchy, and thereby retains it (and maybe retains it in other parts of its logic as well). After all this, the autorelease
pool is drained.
I can only assume that syntesized
property is autoreleasing the old
value instead of release, is this the
case?
No, synthesized setters release the object immediately. (Although some framework classes might hold on to the object a bit longer, if it's a view that needs to be animated out for example.)