Understanding reference counting with Cocoa and Objective-C

后端 未结 14 1657
攒了一身酷
攒了一身酷 2020-11-22 16:46

I\'m just beginning to have a look at Objective-C and Cocoa with a view to playing with the iPhone SDK. I\'m reasonably comfortable with C\'s malloc and f

14条回答
  •  自闭症患者
    2020-11-22 17:33

    As several people mentioned already, Apple's Intro to Memory Management is by far the best place to start.

    One useful link I haven't seen mentioned yet is Practical Memory Management. You'll find it in the middle of Apple's docs if you read through them, but it's worth direct linking. It's a brilliant executive summary of the memory management rules with examples and common mistakes (basically what other answers here are trying to explain, but not as well).

提交回复
热议问题