Re: Cocoa class extension best practice
Re: Cocoa class extension best practice
- Subject: Re: Cocoa class extension best practice
- From: Graham Cox <email@hidden>
- Date: Tue, 15 Oct 2013 23:22:26 +0100
On 15/10/2013, at 11:10 PM, "Mills, Steve" <email@hidden> wrote:
> No, it's the itemArray. Ignore the code you can't see in the loop. It's simply asking each item for its tag.
OK, so if that's the case, I'm interested in knowing whether each call to -itemArray returns the same object or a different one each time. If it's different, then it's either a copy of some internal array or something built on the fly. It should therefore be autoreleased. If your (incorrect, but understandable) attempt to call -release causes a crash, then it definitely is being (over)released at some point, so it can't be leaking as long as there really is an autorelease pool in place. So that might lead you to look at how and where these methods are being called, e.g. sure they're on the main thread, within a runloop event handler of some sort?
--Graham
_______________________________________________
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