On Sep 27, 2015, at 17:17 , Scott Ribe <scott_r...@elevated-dev.com> wrote: > > But I know that it does not result in a retain cycle, because I nil out fun > at the appropriate time. So how to get rid of the warning?
IIRC you can simply assign ‘self’ to a local variable just before assigning to ‘fun', and use the local variable name instead of ‘self’ inside the block. The other approach I’ve used, when I have control the signature of the block, is to pass ‘self’ as a parameter to the block invocation. This may actually avoid the reference cycle completely. _______________________________________________ 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