On 12/09/2013, at 6:07 PM, Kyle Sluder <k...@ksluder.com> wrote:

> Personally, I would avoid doing this, as it could cause reentrancy among
> KVO observers of eventTypes. Instead, I'd assign to mEventTypes directly
> from your lazy initializer. Or perhaps I would factor out the common
> setter code to a private helper method.

Indeed, I have changed the code to do just this, which is what I would have 
written in the first place (honest!). I'm not sure why it wasn't and changing 
it appears to have not caused any problems.

> Hopefully this has the side effect of shutting the analyzer up.


It does.

I guess the thread is now really about why the analyser was thrown off by this. 
Academic? Perhaps, but here's the bigger picture: I want to gradually move my 
codebase to ARC, so in preparation for that, I have been going through and 
trying to ensure the analyser is happy, since my understanding is that ARC 
relies on the same analysis to do its thing correctly, so if the analyser is 
getting it wrong, converting to ARC might introduce a bug here.

--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