• 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: There's obviously something I don't understand about autorelease.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: There's obviously something I don't understand about autorelease.


  • Subject: Re: There's obviously something I don't understand about autorelease.
  • From: Matt Neuburg <email@hidden>
  • Date: Mon, 19 Mar 2012 11:48:50 -0700

On Sat, 17 Mar 2012 21:06:49 -0700, Quincey Morris <email@hidden> said:
>I shouldn't have suggested that property declarations didn't need memory management attributes, but all of the current attributes are "wrong" (because they do double-duty as ivar reference attributes). I *think* the "right" property attributes should be exactly one of the following list per declaration:
>
>	owning
>	nonowning
>	copying
>	readonly
>	readwrite,owning
>	readwrite,nonowning
>	readwrite,copying
>

As long as we're just dreaming up our own linguistic world, I'd suggest that instead of "owning" we say "owning-copying". I've never liked the way "copy" implies "retain". The word "retain" tells you something very important, namely that this thing has an elevated retain count and needs release later. It's not very nice to expect a beginner to know that "copy" *also* means that. If you're copying, you're taking ownership, and "owning-copying" would remind you of that. m.

--
matt neuburg, phd = email@hidden, <http://www.apeth.net/matt/>
A fool + a tool + an autorelease pool = cool!
Programming iOS 5! http://shop.oreilly.com/product/0636920023562.do
_______________________________________________

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: There's obviously something I don't understand about autorelease.
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: There's obviously something I don't understand about NSDate.
  • Next by Date: Re: Why so many public properties all up in my grizzle?
  • Previous by thread: Re: There's obviously something I don't understand about autorelease.
  • Next by thread: Re: There's obviously something I don't understand about autorelease.
  • Index(es):
    • Date
    • Thread