• 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: Charles Srstka <email@hidden>
  • Date: Sat, 17 Mar 2012 22:23:28 -0500

On Mar 17, 2012, at 7:05 PM, G S wrote:

> On Sat, Mar 17, 2012 at 4:55 PM, Roland King <email@hidden> wrote:
>
>> Hmm - with respect - autorelease is an implementation detail. Nothing says
>> that objects created through the convenience constructors like [ NSDate
>> date ] have to be autoreleased, they just have to be valid for long enough
>> to be useful, they could be held in a cache and cleaned out by little
>> gnomes later.
>>
>
> Fair enough.  Better to have said, "objects I didn't allocate.”

Or better yet, “objects you don’t own.” In addition to allocating an object, you can take ownership of an object by retaining an object that something else passes to you.

> I would've converted my project to ARC had time permitted.  I will say that
> this new understanding does make me reconsider my opinion on the merits of
> properties (meaning I think they have more merit than I used to).
>
> Would it be a waste of time to go through and add properties for my members
> before converting to ARC?  Does it make any difference?

It makes the code cleaner and more flexible, IMO.

Charles
_______________________________________________

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


References: 
 >Re: There's obviously something I don't understand about autorelease. (From: G S <email@hidden>)

  • Prev by Date: Re: There's obviously something I don't understand about NSDate.
  • Next by Date: Re: There's obviously something I don't understand about autorelease.
  • 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