Skip navigation.
 
mlRe: Beginner with Cocoa
FROM : Jack Repenning
DATE : Mon Mar 24 18:01:58 2008

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

Related mailsAuthorDate
mlBeginner with Cocoa Alex Handley Mar 21, 20:00
mlRe: Beginner with Cocoa Jeff LaMarche Mar 21, 20:21
mlRe: Beginner with Cocoa Jack Repenning Mar 24, 05:16
mlRe: Beginner with Cocoa Sherm Pendley Mar 24, 05:44
mlRe: Beginner with Cocoa Jeff LaMarche Mar 24, 13:12
mlRe: Beginner with Cocoa Erik Buck Mar 24, 15:13
mlRe: Beginner with Cocoa Scott Thompson Mar 24, 15:32
mlGarbage collection - was Beginner with Cocoa Bill Cheeseman Mar 24, 15:57
mlRe: Garbage collection - was Beginner with Cocoa colo Mar 24, 16:30
mlRe: Garbage collection - was Beginner with Cocoa Bill Cheeseman Mar 24, 17:12
mlRe: Garbage collection - was Beginner with Cocoa Erik Buck Mar 24, 17:12
mlRe: Garbage collection - was Beginner with Cocoa Clark Cox Mar 24, 17:45
mlRe: Beginner with Cocoa Jack Repenning Mar 24, 18:01
mlRe: Garbage collection - was Beginner with Cocoa colo Mar 24, 18:02
mlRe: Garbage collection - was Beginner with Cocoa Scott Thompson Mar 24, 18:36
mlRe: Beginner with Cocoa colo Mar 24, 18:43
mlRe: Garbage collection - was Beginner with Cocoa Bill Cheeseman Mar 24, 18:45
mlRe: Beginner with Cocoa Jeff LaMarche Mar 24, 18:54
mlRe: Beginner with Cocoa Sherm Pendley Mar 24, 18:57
mlRe: Beginner with Cocoa Chris Hanson Mar 24, 19:39
mlRe: Beginner with Cocoa Clark Cox Mar 24, 19:44
mlRe: Garbage collection - was Beginner with Cocoa colo Mar 24, 21:03
mlRe: Garbage collection - was Beginner with Cocoa has Mar 24, 22:59
mlRe: Garbage collection - was Beginner with Cocoa Scott Thompson Mar 25, 03:15
mlRe: Beginner with Cocoa Scott Ribe Mar 25, 21:57
mlRe: Garbage collection - was Beginner with Cocoa Scott Ribe Mar 25, 22:06
mlRe: Beginner with Cocoa Bill Cheeseman Mar 25, 22:40
mlRe: Garbage collection - was Beginner with Cocoa Jack Repenning Mar 25, 23:01
mlRe: Garbage collection - was Beginner with Cocoa Nick Zitzmann Mar 25, 23:07
mlRe: Garbage collection - was Beginner with Cocoa Paul Bruneau Mar 25, 23:11
mlRe: Garbage collection - was Beginner with Cocoa Randall Meadows Mar 25, 23:15
mlRe: Garbage collection - was Beginner with Cocoa Rob Napier Mar 26, 00:02
mlRe: Garbage collection - was Beginner with Cocoa Jack Repenning Mar 26, 00:28
mlRe: Garbage collection - was Beginner with Cocoa colo Mar 26, 00:52
mlRe: Garbage collection - was Beginner with Cocoa Erik Buck Mar 26, 01:38
mlRe: Garbage collection - was Beginner with Cocoa mmalc crawford Mar 26, 06:24