When do i need assign property and when not?
Can any one give me example when do开发者_运维技巧 i need assign property only...??
- Primitives: int, float, structs, etc.
- Pointers to "non-objects": c arrays, functions.
- 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.
精彩评论