On Oct 20, 2011, at 1:20 PM, Greg Parker wrote: > On Oct 20, 2011, at 10:11 AM, Matt Neuburg wrote: >> You know there's a rule that Create means a retained ref is returned > > There is no such rule in the Cocoa memory management conventions. > > http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmRules.html > > There is a "Create" rule in the convention for CoreFoundation functions, but > that convention does not apply to Objective-C methods.
Sure, but still, he's returning a retained CGColorRef. And CGColor participates in this convention (CGColorRelease, CGColorRetain, CGColorCreate etc.). I'm not saying he has to do it; I'm merely suggesting that the magic word "Create" will help him remember what he's trying to remember, namely that he's returning a retained CGColorRef and the caller will need to call CGColorRelease on it later. m._______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com