开发者

When do i need assign property and when not?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜