Re: C struct and __unsafe_unretained
Re: C struct and __unsafe_unretained
- Subject: Re: C struct and __unsafe_unretained
- From: Thomas Davie <email@hidden>
- Date: Sun, 30 Oct 2011 18:44:20 +0000
Yes and no – it means you have an NSString there that can disappear at any moment without warning, and when it does, you'll still have a pointer into garbage memory. Also, if the original code has been copying/retaining it into the struct and releasing it out, then it's entirely possible that by doing this you very much *are* changing something.
Personally I would take this as a prompt to move to using a class and a (copy) property.
Bob
if (*ra4 != 0xffc78948) { return false; }
On 30 Oct 2011, at 18:40, James Merkel wrote:
> Ok thanks. Not changing anything is the easiest and safest approach.
>
> Jim Merkel
>
> On Oct 30, 2011, at 10:52 AM, Dave Zarzycki wrote:
_______________________________________________
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