Correct for both points.
Objects only get added to autorelease pools if you call -autorelease
on them. By convention all methods not starting with alloc
, new
, copy
or mutableCopy
return objects that they have themselves added to the autorelease pool, so you don't have to do it yourself.
See http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmRules.html for details.