Typically there should be no reason to explicitly ask an object what its retain count is (see retainCount). The result is often misleading, as you may be unaware of what framework objects have retained an object in which you are interested. In debugging memory management issues, you should be concerned only with ensuring that your code adheres to the ownership rules.
翻译:通 常我们没有必要去特地查询一个对象的retain count是多少。查询的结果常常会出乎意料。你不清楚framework里面的其他对象对你感兴趣的这个对象进行了多少retain操作。在debug 内存管理的问题时候,你只要关注保证你的代码符合所有者规则即可。
so,在引用计数的内存管理方式里面,我们可以把alloc, retain, copy, new, mutableCopy看作是+1操作。而通常根据原则,你要负责在适当的时候执行-1操作以保证没有内存泄漏就可以了。