On 21 Apr 2014, at 15:53, Keary Suska <cocoa-...@esoteritech.com> wrote:
> 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. Agreed! I assumed that leaving off the default for this attribute would be retain, whereas in fact it must have been assign when it was originally written. I think that this is SUCH an important aspect that it give a warning if it’s not specified explicitly. I’d also promote that one to an error! Cheers Dave _______________________________________________ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com