NSLog(@\"first:%u\",[object retainCount]);
[object release];
NSLog(@\"second:%u\",[object retainCount]);
Output:
first:1 second:1
First, retainCount doesn't give you a number you can use. It's meaningless.
Second, the reason the retainCount is 0 is probably that you try to work with an object that doesn't exist anymore. You're lucky your application doesn't crash, because your accessing invalid memory. Decreasing the retainCount just before deallocating an object is unnecessary, therefore Apple doesn't do it, probably.