On Sep 12, 2013, at 9:57 AM, Bill Cheeseman wrote:

> As I recall, it stated that the "return [[x retain] autorelease]" pattern is 
> preferred for getters and gave many reasons for preferring it. 

Coincidentally enough, we've just hit a case where that's bad - it's a 
complicated situation with ObjC++ and C++ object lifetimes, resulting in an 
accessor that uses that pattern being called as a result of that object being 
in dealloc. By the time the autorelease pool pops the object it's trying to 
release is long gone. It's KVO unregistering, so there's not much we can do 
about it other than be smarter in our accessors.
_______________________________________________

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

Reply via email to