> But if your dealloc is like this... > > - (void)dealloc > { > self.thisProp = nil; > self.thatProp = nil; > ... > } > > then you'll be calling the accessors and the right thing will happen > (i.e. release if necessary). This is what I currently do for all dev > work (iPhone or Mac OS X). In fact, I use accessors everywhere and > never do direct ivar access.
My understanding (and I'm a noob in this) is that "best practices" recommend that you shouldn't start sending additional messages to an object from inside its dealloc. Those property accesses are just candy-coated calls to setThisProp:, etc which violates the 'don't send message to yourself' recommendation. Anyone want to clarify if it is/isn't safe to do this? Certainly most of the samples I've seen go out of their way to release instance variables rather than nil properties, in their dealloc's (This is the one thing I hate the *most* about properties - they really feel glued on, at this point, rather than being a language feature that the "whole compiler" knows about) _______________________________________________ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]