Objective-C memory management, xml parser and other non-trivial examples

前端 未结 6 1653
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-04 18:00

I know the basic principles about memory management (retain count, autorelease pools etc) in Cocoa, but once you go past simple retain/release, it\'s getting a bit more confusin

6条回答
  •  半阙折子戏
    2021-02-04 18:27

    @2nd question

    Looks like you are setting a UILabel text property, which in this case uses copy. In the documentation it says:

    @property(nonatomic, copy) NSString *text;
    

    This means the Label will copy and retain that copy not changing or retaining the object used to assign the property.

提交回复
热议问题