1. Release the objects created by the alloc method, the objects copied by the copy and mutablecopy methods, and the objects that manually call retain. The alloc method creates a new object and sets the object retention count to 1. The copy and mutablecopy Methods create a copy of the object and set its retention count to 1. Manually calling retain will increase the retention count of the object by 1 to ensure that the object will not be recycled during use. All three methods require us to manually call release for release.
2. The automatically released object does not need to call release, because the released responsibility has been transferred to the automatically released pool.
3. Just do it yourself. If you obtain an object provided by other methods, you do not need to consider the memory management of the object. However, if you want to use the object for a period of time, you need to keep the object and release it after use (to prevent the object from being released during use ).
4. Keep in mind the above three memory management principles without relying on the retaincount method returned by the reserved Count value (http://yeeyaa.me/articles/2011/04/avoid-getting-object-reference-count-using-retaincount/
).