Monday, June 4, 2012

Understanding reference counting with Cocoa and Objective-C

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 free concept, but Cocoa's references counting scheme has me rather confused. I'm told it's very elegant once you understand it, but I'm just not over the hump yet.

How do release , retain and autorelease work and what are the conventions about their use?

(Or failing that, what did you read which helped you get it?)

Source: Tips4all

No comments:

Post a Comment