• 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: Newbie OOP style question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie OOP style question


  • Subject: Re: Newbie OOP style question
  • From: Tim Gray <email@hidden>
  • Date: Thu, 11 May 2006 20:37:20 -0400

On 5/11/06, Pierce T. Wetter III wrote:

>   But really, its just a matter of practice with the idiom:
>
>    1. Did you call init? Better call release/autorelease somewhere.
>    2. Did you get the object from someone else and you need to keep
> it around? better call [retain].
>    3. call [instanceObj release] on every instance variable in your
> dealloc method.

Thanks for this.  I will print it out and tape it up next to monitor until I get it straight.  I was planning on rereading the chapters on reference counting, retaining, and releasing tonight - I guess thats definitely a good idea.

Also thanks to the others for clearing me up on the local declaration as opposed to doing it in the class interface - it seems so obvious :)

Looking forward to getting a handle on this stuff.

Tim
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Newbie OOP style question
      • From: mmalcolm crawford <email@hidden>
References: 
 >Re: Newbie OOP style question (From: "Pierce T. Wetter III" <email@hidden>)

  • Prev by Date: Should objects returned by indirection be autoreleased
  • Next by Date: Re: creating NSCalendarDate with a specific time zone
  • Previous by thread: Re: Newbie OOP style question
  • Next by thread: Re: Newbie OOP style question
  • Index(es):
    • Date
    • Thread