On 12/09/2013, at 5:00 PM, Bill Cheeseman <wjcheese...@gmail.com> wrote:

> Fix the name and the Analyzer is happy. No need to change the code, because 
> the code is correct

Except that 'fixing' the name would make the code incorrect, because then it 
isn't a valid getter name.

If you did go ahead and name it thus, the caller would assume that it's their 
job to release the returned value. If they did that, it would leave mEventTypes 
dangling, and a later call to -release in -dealloc would crash due to an 
overrelease. So renaming the method is wrong on both counts.

--Graham


_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to