Where did you see it? Those are all things of the past, there are no restrictions in ARC, you can use it as you like.
In the old days of manual memory management, calling properties would involve adding and subtracting reference counters, and self = [super ...] 初始化的对象不一定是当前类的对象,可能是“变体”或私有类(objc里的class有 class 和 metaclass 的区别),所以在你不知道属性 setter 方法里到底是怎么加减引用计数器的情况下,你就只针对 ivar just retain and release.
Because there are categories (Category), setters, getters, KVO, etc. that need to be paid attention to The most important thing is because of the classification. Grammar can call the attributes and methods of the classification, but _ does not work, you need to pay attention
Where did you see it? Those are all things of the past, there are no restrictions in ARC, you can use it as you like.
In the old days of manual memory management, calling properties would involve adding and subtracting reference counters, and
self = [super ...]
初始化的对象不一定是当前类的对象,可能是“变体”或私有类(objc里的class有class
和metaclass
的区别),所以在你不知道属性 setter 方法里到底是怎么加减引用计数器的情况下,你就只针对ivar
just retain and release.retain(copy,new) and release appear in pairs
Because it will generate circular references, such as delegate, and then it will never be released
Because there are categories (Category), setters, getters, KVO, etc. that need to be paid attention to
The most important thing is because of the classification. Grammar can call the attributes and methods of the classification, but _ does not work, you need to pay attention