• 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: Rob Ross <email@hidden>
  • Date: Tue, 23 Nov 2010 17:41:16 -0800

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

Rephrased : "If you obtain an object using a method containing the words alloc, copy, or new, *you* are responsible for releasing the object, otherwise you are not responsible and the object will be auto-released."

That's a true statement, and a very useful one to remember. Of course, as you said there's more to memory management than just *who* is responsible for releasing an object, but it's a huge part of memory management. I think calling it nonsense is a bit too extreme.

Rob

On Nov 23, 2010, at 5:23 PM, Graham Cox wrote:

>
> On 24/11/2010, at 3:42 AM, Rounak Jain wrote:
>
>> "If you allocate an object using alloc, you need to take responsibility for releasing it when you’re done.
>> However, if class methods are used, then there is no need to worry about releasing objects because they are auto-released."
>
>
> This is nonsense. If the memory management rules could be boiled down to this statement, there wouldn't be a need to have a whole chapter devoted to it.
>
> Read the memory management rules, and learn them.
>
> 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

  • Follow-Ups:
    • Re: Help with Basics
      • From: Bill Bumgarner <email@hidden>
    • Re: Help with Basics
      • From: Graham Cox <email@hidden>
References: 
 >Re: Help with Basics (From: Rounak Jain <email@hidden>)
 >Re: Help with Basics (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Help with Basics
  • Next by Date: Re: Help with Basics
  • Previous by thread: Re: Help with Basics
  • Next by thread: Re: Help with Basics
  • Index(es):
    • Date
    • Thread