Re: ARC Retain Cycles
Re: ARC Retain Cycles
- Subject: Re: ARC Retain Cycles
- From: Keary Suska <email@hidden>
- Date: Mon, 21 Apr 2014 08:53:56 -0600
On Apr 21, 2014, at 8:12 AM, Dave wrote:
> @property (nonatomic,retain) id payloadObject;
>
> This is after I ARCed it, before that it didn’t specify it, e.g. it was (nonatomic). I must have made it retain when I was going through the properties. I’m not sure what the default is? I assume it must have been assign for this to work originally. I did a google for this and found conflicting results, according to the Objective-C Reference Manial, it’s assign. But I’m not sure where the “Offical” Objective-C manual is located to get it from the source.
>
> payloadObject is just used to hold a copy of the object to pass to the delegate method
>
>
> After changing this, the leaks when down by a massive factor. Basically it was hanging onto *every* response from the server!
>
> I’m about to look through the code and see if I’ve made a similar mistake elsewhere.
>
> There are still a few more small leaks which I’m looking at now, but this is the mainstay - thanks again!
I find this a somewhat confusing and non-inutitive issue with ARC--"strong" is the default under ARC, vs. "assign" in non-ARC. This can be a tricky issue when converting MRR projects.
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
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