• 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: real authority on what needs to be released
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: real authority on what needs to be released


  • Subject: Re: real authority on what needs to be released
  • From: Bill Cheeseman <email@hidden>
  • Date: Wed, 11 Sep 2002 17:22:16 -0400

on 02-09-11 4:11 PM, Dietrich Epp at email@hidden wrote:

> Basically you own anything you alloc/init, copy, or retain. Then you
> release it when you're done. If you don't own it, it's probably been
> autoreleased. When the autorelease pool is deallocated, objects in it
> will be released too - basically a delayed release.

It isn't easy for a newbie to interpret how this simple rule is actually
applied in lots and lots of situations. Some of the articles cited earlier
give many examples of how this rule should be applied in particular
situations. But new questions are constantly encountered while programming.
It takes thought, reading, and experimentation to get it right.

Anybody who says that the simple rule is all you need to know ought to try
reading the First Amendment to the U.S. Constitution. The rule is real
simple: the right of free speech shall not be infringed. More than 200 years
later, you still have to read hundreds of thousands of pages of judicial
decisions to know just a little bit about what that means in practice.

--

Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com

The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
Croquet Club of Vermont - http://members.valley.net/croquetvermont
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: real authority on what needs to be released
      • From: Ondra Cada <email@hidden>
References: 
 >Re: real authority on what needs to be released (From: Dietrich Epp <email@hidden>)

  • Prev by Date: Re: [newbie] NSString code so it won't leak
  • Next by Date: Re: real authority on what needs to be released
  • Previous by thread: Re: real authority on what needs to be released
  • Next by thread: Re: real authority on what needs to be released
  • Index(es):
    • Date
    • Thread