FROM : Chris Hanson
DATE : Mon Mar 24 19:39:09 2008
On Mar 24, 2008, at 10:01 AM, Jack Repenning wrote:
> 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.
Yes, it is. Aside from the availability of autorelease, Objective-C's
retain/release rules are not significantly different from those for
AddRef/Release in Microsoft COM & ActiveX. And as others have pointed
out, there are even reference-counted smart pointers in Standard C++;
these have explicit (C++-style) API.
Some programming environments hide the fact that reference counting is
taking place. Not all do. Objective-C and Cocoa are not unique in
this respect.
-- Chris
DATE : Mon Mar 24 19:39:09 2008
On Mar 24, 2008, at 10:01 AM, Jack Repenning wrote:
> 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.
Yes, it is. Aside from the availability of autorelease, Objective-C's
retain/release rules are not significantly different from those for
AddRef/Release in Microsoft COM & ActiveX. And as others have pointed
out, there are even reference-counted smart pointers in Standard C++;
these have explicit (C++-style) API.
Some programming environments hide the fact that reference counting is
taking place. Not all do. Objective-C and Cocoa are not unique in
this respect.
-- Chris






Cocoa mail archive

