• 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: Help with Basics
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with Basics


  • Subject: Re: Help with Basics
  • From: Graham Cox <email@hidden>
  • Date: Wed, 24 Nov 2010 12:59:18 +1100

On 24/11/2010, at 12:41 PM, Rob Ross wrote:

> It's not nonsense, although Jain's description is a little too loose.
>
> Rephrased:

First rule of the Cocoa Club: You must not rephrase The Rules.

>>> However, if class methods are used, then there is no need to worry about releasing objects because they are auto-released."

This is nonsense, which was the part I was mostly referring to.

Objects returned by class methods are not autoreleased as a rule, though they may well be, and typically are - all you need to know is THAT YOU DO NOT OWN THEM. You may not need to be concerned with releasing them, because as you're not their owner it's not your job, but you CERTAINLY have to be concerned with retaining them, if you want to keep a reference to them, perhaps in an ivar.

But I'm straying dangerously into rephrasing territiory here, so I'll simply repost the link:

http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/MemoryMgmt/MemoryMgmt.html

--Graham


_______________________________________________

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: 
 >Re: Help with Basics (From: Rounak Jain <email@hidden>)
 >Re: Help with Basics (From: Graham Cox <email@hidden>)
 >Re: Help with Basics (From: Rob Ross <email@hidden>)

  • Prev by Date: Re: Help with Basics
  • Next by Date: Re: unit test exit's abnormally with code 5
  • Previous by thread: Re: Help with Basics
  • Next by thread: Re: Help with Basics
  • Index(es):
    • Date
    • Thread