You've done an alloc & init on your "object
". That makes the retain count 1.
When you add it to your dictionary, that makes the retain count 2.
When you release the dictionary, the retain count of the object is decremented to 1.
Which is why you can print out the "contents" of it, since "object
" has a retain count of 1 and has not been truly released yet.