Re: Beginner with Cocoa
Re: Beginner with Cocoa
- Subject: Re: Beginner with Cocoa
- From: Scott Ribe <email@hidden>
- Date: Tue, 25 Mar 2008 14:57:07 -0600
- Thread-topic: Beginner with Cocoa
> 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.
True, but slightly-deferred release is not common, and the autorelease pool
is pretty much unique. And the uniqueness does throw newbies off. The
autorelease pool is an elegant technique which actually eliminates the
majority of reference count incrementing/decrementing code (outside
accessors), but it does seem to throw people off.
When you *read* about Cocoa memory management, it may seem like there's a
lot more to do than there actually is when you start *writing* Cocoa code.
Unless of course you don't follow the rules literally, and tie yourself up
in knots, using convenience methods, then unnecessarily retaining the
object, then passing it through to some Cocoa method, then (auto)releasing
it...
--
Scott Ribe
email@hidden
http://www.killerbytes.com/
(303) 722-0567 voice
_______________________________________________
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