Re: Cocoa class extension best practice
Re: Cocoa class extension best practice
- Subject: Re: Cocoa class extension best practice
- From: Steve Mills <email@hidden>
- Date: Tue, 15 Oct 2013 16:39:29 -0500
On Oct 15, 2013, at 15:35:32, Kyle Sluder <email@hidden>
wrote:
> They shouldn't be leaking. You're correct that -itemArray doesn't follow
> the naming convention of an object-creation method (new, alloc, copy,
> etc.), so you should not assume a +1 owning reference.
Thanks for confirming that.
> Are you perhaps seeing an autoreleased object hang out longer than you
> expected, but not actually get leaked?
I don't think this is the case. I was seeing hundreds of still-alive allocated objects that came from the copied itemArray. I could clearly see a pattern in the Allocations sampling of Instruments of these objects, with the pattern repeating every time I did some user action in our app. And there was time between those actions, so if the autorelease pool wasn't getting any time to drain, there would be a much more serious issue at hand.
I'll look more at this tomorrow. I don't know why they only gave me 8G of RAM in this machine - Xcode loves to get all hoggy and slow after a few hours of serious building, debugging, and Instrumenting. Going home sounds better than rebooting right now. :)
--
Steve Mills
office: 952-818-3871
home: 952-401-6255
cell: 612-803-6157
_______________________________________________
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