• 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: 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

  • Follow-Ups:
    • Re: Beginner with Cocoa
      • From: Bill Cheeseman <email@hidden>
References: 
 >Re: Beginner with Cocoa (From: Erik Buck <email@hidden>)

  • Prev by Date: Re: Perform selector on thread
  • 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