3 ms·
> 2. When you type "alloc" there is an implied retain. It's not quite that simple. The official rule from Apple's Memory Management Programming Guide most suc
by zpasternack 15y ago
> 2. When you type "alloc" there is an implied retain.
It's not quite that simple. The official rule from Apple's Memory Management Programming Guide most succinctly states "You take ownership of an object if you create it using a method whose name begins with “alloc”, “new”, “copy”, or “mutableCopy” (for example, alloc, newObject, or mutableCopy), or if you send it a retain message."