Re: Proper way to retain member of AppDelegate?
Re: Proper way to retain member of AppDelegate?
- Subject: Re: Proper way to retain member of AppDelegate?
- From: Howard Moon <email@hidden>
- Date: Wed, 15 Oct 2014 15:21:41 -0700
Oh, ok, thanks! Yes, that works, simply removing the (assign) or (retain) (leaving it as the default, strong).
It's hard to follow examples I find on the internet since so many are out of date or don't use ARC, and there's no easy way to tell them apart.
Thanks!
-Howard
On Oct 15, 2014, at 2:30 PM, Jens Alfke <email@hidden> wrote:
>
>> On Oct 15, 2014, at 1:58 PM, Howard Moon <email@hidden> wrote:
>>
>> I think I resolved it… my data object's members were all declared using @property(assign). I changed those all to @property(retain), and it works now.
>
> Don't use assign or retain in ARC, use weak and strong. (And generally you'd just omit strong since it's the default.)
>
> —Jens
_______________________________________________
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