• 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: Autorelease Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Autorelease Question


  • Subject: Re: Autorelease Question
  • From: Luke Hiesterman <email@hidden>
  • Date: Thu, 20 Nov 2008 20:53:11 -0800

So thinking gets in the way of understanding and not thinking is the path to enlightenment?

Sent from my iPhone.

On Nov 20, 2008, at 8:45 PM, Jim Correia <email@hidden> wrote:

On Nov 20, 2008, at 11:36 PM, Kiel Gillard wrote:

On 21/11/2008, at 2:55 PM, Adam Leonard wrote:


I think this is a bug in the documentation. I am curious to know what others think.

While your discovery is interesting, maybe we're not supposed to know how NSString is implemented. Even if on your computer you do not get double free messages in your run log, a crash or whatever, I'm all for keeping the memory management rules simple and treating anything that doesn't contain "alloc] init...]" or "new]" as autoreleased.

The memory management rules are already simple. There are three rules.

Making up your own interpretations of them, such as "treating anything that doesn't contain 'alloc] init]' or 'new]' as autoreleased", is not only incorrect, but gets in the way of a fundamental understanding of how things work.

What happens to an object before it is handed to you is completely irrelevant. It doesn't matter. Thinking about what the method might have done with the object is a waste of mental effort. The only thing which is important is whether or not you are responsible for releasing the object.

Jim

_______________________________________________

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
_______________________________________________

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: Autorelease Question
      • From: Sherm Pendley <email@hidden>
    • Re: Autorelease Question
      • From: "Kyle Sluder" <email@hidden>
    • Re: Autorelease Question
      • From: Jason Stephenson <email@hidden>
References: 
 >Autorelease Question (From: "Carmen Cerino Jr." <email@hidden>)
 >Re: Autorelease Question (From: Joseph Crawford <email@hidden>)
 >Re: Autorelease Question (From: Alexander Spohr <email@hidden>)
 >Re: Autorelease Question (From: Adam Leonard <email@hidden>)
 >Re: Autorelease Question (From: Klaus Backert <email@hidden>)
 >Re: Autorelease Question (From: Adam Leonard <email@hidden>)
 >Re: Autorelease Question (From: Kiel Gillard <email@hidden>)
 >Re: Autorelease Question (From: Jim Correia <email@hidden>)

  • Prev by Date: Re: Autorelease Question
  • Next by Date: Button and Matrix problems
  • Previous by thread: Re: Autorelease Question
  • Next by thread: Re: Autorelease Question
  • Index(es):
    • Date
    • Thread