Re: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects)
Re: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects)
- Subject: Re: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects)
- From: Ricky Sharp <email@hidden>
- Date: Wed, 19 Nov 2008 17:05:32 -0600
On Nov 19, 2008, at 4:11 PM, j o a r wrote:
On Nov 19, 2008, at 1:57 PM, Jeff Laing wrote:
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.
That is indeed correct. The official guideline is, AFAIK, to not
call through your properties in init / dealloc.
I guess I really missed that part of the docs.
In all my desktop code, I always call my setters (non prop based) in
dealloc:
[self setTitle:nil];
[self setColor:nil];
etc.
Just seemed natural to do self.title = nil, etc as I viewed properties
as just a 1 to 1 replacement of manually setting stuff up.
Now, when you say "call through your properties in init/dealloc", is
that explicitly for things set up with @property? Or, has what I've
been doing all these years with calls to accessors in init/dealloc
really "bad"?
In my case, I do have a decent amount of code being shared between
platforms. And, such code doesn't yet use properties. After reading
this thread, it's very temping to just rid myself of the properties
and go back to rolling my own accessors as needed (I do have
Accessorizer, so that task is not hard at all).
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
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