开发者

When do i need assign property and when not?

开发者 https://www.devze.com 2023-01-14 18:29 出处:网络
Can any one give me example when do开发者_运维技巧 i need assign property only...?? Primitives: int, float, structs, etc.

Can any one give me example when do开发者_运维技巧 i need assign property only...??


  1. Primitives: int, float, structs, etc.
  2. Pointers to "non-objects": c arrays, functions.
  3. Helper properties that you intend to retain in other controller objects. Delegates and handlers are common throughout.

Otherwise, refer to the memory management docs here. Pay special attention to the section on retain cycles.
http://developer.apple.com/iphone/library/iPad/index.html#documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmObjectOwnership.html


Every time you do not want to retain it.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号