Re: Clarification on accessors? (was: Yet another memory management question)
Re: Clarification on accessors? (was: Yet another memory management question)
- Subject: Re: Clarification on accessors? (was: Yet another memory management question)
- From: Chris Parker <email@hidden>
- Date: Wed, 08 Jul 2009 18:34:17 -0700
Because you have no idea what subclassers may do in their overrides of
the accessors (e.g. The subclassed accessor may rely on state that's
been torn down earlier in -dealloc).
It's just not safe, unless you can guarantee that you own the entire
inheritance chain.
.chris
On Jul 8, 2009, at 6:08 PM, Erik Buck <email@hidden> wrote:
What about properties that aren't backed by instance variables?
Accessors are still needed to set properties stored in an auxiliary
dictionary etc. There are literally only hours left for me to
change a recommendation in "Cocoa Design Patterns" that you SHOULD
use accessors in initializers and -dealloc. Remind me again why I
shouldn't ?
--- On Wed, 7/8/09, Bill Bumgarner <email@hidden> wrote:
From: Bill Bumgarner <email@hidden>
Subject: Re: Clarification on accessors? (was: Yet another memory
management question)
To: "Sean McBride" <email@hidden>
Cc: "Erik Buck" <email@hidden>, email@hidden
Date: Wednesday, July 8, 2009, 7:23 PM
On Jul 8, 2009, at 1:40 PM, Sean McBride wrote:
On 7/8/09 11:20 AM, Erik Buck said:
The bottom line is that accessors are the only way to set
synthesized
instance variables to nil in the modern (64bit) Objective-C runtime.
True. But if I remember previous discussions correctly, that's a
bug,
not a feature.
Correct. 'Tis a bug. A fixed one, too, if you have access to the
Snow Leopard seeds or grab the clang compiler from the llvm.org
repository.
b.bum
_______________________________________________
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
_______________________________________________
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