Here's my understanding of it:
Object are only retained (reference counter is incremented):
init
from NSObject
is called. retain
is called.Objects are only released (reference counter is decremented):
release
is called.And to clarify, autorelease does not retain, but just places the object into the top most pool on the autorelease pool stack.
No.
init
does not retain, and there are various methods you didn’t mention which do. There is a simple (and also correct) summary in Memory Management Programming Guide for Cocoa.
(There are two exceptions that I’m aware of: the NSPropertyListSerialization
methods which provide a retained error string by reference.)