Re: Passing param by reference then using within block throws exception
Re: Passing param by reference then using within block throws exception
- Subject: Re: Passing param by reference then using within block throws exception
- From: Steve Mills <email@hidden>
- Date: Wed, 21 Sep 2016 07:53:12 -0500
On Sep 21, 2016, at 01:29:37, Jens Alfke <email@hidden> wrote:
>
> I think the real problem is that the -enumerateObjectsUsingBlock: method has an autorelease pool. If your real code is assigning something other than a string constant to *fillMeIn, that string will probably get dealloced when the autorelease pool drains. Your workaround is correct, since assigning the string to noFillMeIn causes it to be retained.
Perhaps, but that couldn't be the cause of the crash. I might not have been totally clear, but the crash happens while setting up to call the method, not inside the method or after it returns.
--
Steve Mills
Drummer, Mac geek
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden