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

Re: Beginner with Cocoa


  • Subject: Re: Beginner with Cocoa
  • From: Jack Repenning <email@hidden>
  • Date: Mon, 24 Mar 2008 10:01:58 -0700

On Mar 24, 2008, at 7:13 AM, Erik Buck wrote:
For the record, reference counting for memory management is one of the oldest techniques in software and is not unique to Objective-C or Cocoa. Microsoft Foundation Class CString uses it. COM/Active-X IUnknown uses it. It's essential to using DirectX. It's essential to using embedded controls.

Reference counting is well established. Retain/release is not reference counting.


The essential point of reference counting is that the language system does it for you, you don't have to think about it at all. Most Java and scripting developers never even learn to think that there are such things as allocation and disposal. The essential point of plain memory management is that you have to think about it constantly, and that the decision actually to free an object (or the research into why it was freed too early or too late) requires knowledge of the state of the entire system.

Retain/release is a middle ground: it's not done automatically, you do have to think about it, a bit. But it's possible to pull it off with very limited thought and very simple constraints. But that mental model is, so far as I'm aware, utterly unique in language design, and turns out to be startlingly hard to learn, coming in either from a true ref-counting world (whence you have to learn to think about something you never before knew existed), or from vanilla do-it- yerself memory management (whence you have to learn to trust a simple system for something that has always meant life-or-death, sweaty palms, and late night aggravation).

-==-
Jack Repenning
Chief Technology Officer
CollabNet, Inc.
8000 Marina Boulevard, Suite 600
Brisbane, California 94005
office: +1 650.228.2562
mobile: +1 408.835.8090
raindance: +1 877.326.2337, x844.7461
aim: jackrepenning
skype: jrepenning




_______________________________________________

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: Beginner with Cocoa
      • From: "Clark Cox" <email@hidden>
    • Re: Beginner with Cocoa
      • From: Chris Hanson <email@hidden>
    • Re: Beginner with Cocoa
      • From: colo <email@hidden>
References: 
 >Re: Beginner with Cocoa (From: Erik Buck <email@hidden>)

  • Prev by Date: Re: Garbage collection - was Beginner with Cocoa
  • Next by Date: Re: Garbage collection - was Beginner with Cocoa
  • Previous by thread: Re: Beginner with Cocoa
  • Next by thread: Re: Beginner with Cocoa
  • Index(es):
    • Date
    • Thread