• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects)
      • From: j o a r <email@hidden>
References: 
 >Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects) (From: Erik Buck <email@hidden>)
 >Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects) (From: Brian Stern <email@hidden>)
 >Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects) (From: mmalcolm crawford <email@hidden>)
 >Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects) (From: Brian Stern <email@hidden>)
 >Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects) (From: Greg Titus <email@hidden>)
 >Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects) (From: Brian Stern <email@hidden>)
 >Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects) (From: Ricky Sharp <email@hidden>)
 >RE: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects) (From: "Jeff Laing" <email@hidden>)
 >Re: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects) (From: j o a r <email@hidden>)

  • Prev by Date: Re: Autorelease Question
  • Next by Date: Re: Autorelease Question
  • Previous by thread: Re: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects)
  • Next by thread: Re: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects)
  • Index(es):
    • Date
    • Thread