On Fri, Apr 8, 2011 at 9:03 PM, Kyle Sluder <kyle.slu...@gmail.com> wrote:
> If you reference a stack variable from your block, you cannot allow
> that block to escape the scope of that variable.

Well, I suppose it's worth mentioning that read-only NSObject
variables are okay to use in this fashion because the compiler is
smart enough to retain the object when the block gets copied. (Beware
any retain cycles this may create! See Mike Ash's MAZeroingWeakRef.)

I was under the impression you were using the variable for general purposes.

I should have just stuck with Dave's recommendation to ask you to post
your codeā€¦

--Kyle Sluder
_______________________________________________

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

Reply via email to