• 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: [Newbie Q] Memory Management in Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Newbie Q] Memory Management in Cocoa


  • Subject: Re: [Newbie Q] Memory Management in Cocoa
  • From: Douglas Davidson <email@hidden>
  • Date: Tue, 5 Nov 2002 15:16:50 -0800

On Tuesday, November 5, 2002, at 03:12 PM, Jonathan E. Jackel wrote:

I'd rather look at the object as shared. Creating it and retaining it
seems to me equivalent in the sense that both chunks of code -- the one
who alloc/init'd, and the one who retained -- have precisely the same
rights and duties so far as the object in question is concerned. If you
insist of speaking ownership, then the object has more owners at once ;)

I've always liked the dog-leash metaphor. Imagine a dog. If you want to
walk the dog you put a leash on his collar. But the dog is very popular.
Any number of people can "retain" the dog by adding any number of leashes.
When each person is tired of walking the dog, he/she releases the leash.
When the last person let's go of the last leash, the dog is "freed".

That's a striking metaphor, but I think it really doesn't go anywhere...

Douglas Davidson
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: [Newbie Q] Memory Management in Cocoa
      • From: Andy Lee <email@hidden>
References: 
 >RE: [Newbie Q] Memory Management in Cocoa (From: "Jonathan E. Jackel" <email@hidden>)

  • Prev by Date: Re: [Newbie Q] Memory Management in Cocoa
  • Next by Date: Re: Good ol' modal dialogs
  • Previous by thread: RE: [Newbie Q] Memory Management in Cocoa
  • Next by thread: Re: [Newbie Q] Memory Management in Cocoa
  • Index(es):
    • Date
    • Thread