• 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: init for immutable classes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: init for immutable classes


  • Subject: Re: init for immutable classes
  • From: Kyle Sluder <email@hidden>
  • Date: Fri, 18 Sep 2009 08:06:06 -0700

On Sep 18, 2009, at 4:10 AM, Jon Hull <email@hidden> wrote:

I always write my init and dealloc methods using the setter functions, but I am wondering what the proper convention is for immutable classes? Should I write a private setter method, or is it ok to just set the variable in init and release it in -dealloc. Thus:

Never use accessors in -init or -dealloc.

--Kyle Sluder
_______________________________________________

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


References: 
 >init for immutable classes (From: Jon Hull <email@hidden>)

  • Prev by Date: If someone could inspect this code and explain to me what am I doing wrong ?
  • Next by Date: Re: Running Safari from application
  • Previous by thread: init for immutable classes
  • Next by thread: Re: init for immutable classes
  • Index(es):
    • Date
    • Thread