• 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: [[Class alloc] init] preferable over [[Class instance] retain]?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [[Class alloc] init] preferable over [[Class instance] retain]?


  • Subject: Re: [[Class alloc] init] preferable over [[Class instance] retain]?
  • From: "Sean McBride" <email@hidden>
  • Date: Tue, 9 Mar 2010 17:19:20 -0500
  • Organization: Rogue Research Inc.

On Tue, 9 Mar 2010 13:41:03 -0800, Laurent Daudelin said:

>I've been running in that situation and I'm just wondering if there are
>any advice for/against one or the other method.
>
>For example, is:
>
>NSMutableArray *anArray = [[NSMutableArray array] retain];
>
>better than:
>
>NSMutableArray *anArray = [[NSMutableArray alloc] init];

I prefer the latter because with GC 'retain' does nothing, and after
writing GC-only code for so long, seeing it looks 'funny'.  The latter
doesn't look funny with neither GC nor RR.

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


_______________________________________________

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: 
 >[[Class alloc] init] preferable over [[Class instance] retain]? (From: Laurent Daudelin <email@hidden>)

  • Prev by Date: Using a valuetransformer in a popupmenu
  • Next by Date: 10.6 Base, 10.5 Target, runs fine on everything except Intel 10.5
  • Previous by thread: Re: [[Class alloc] init] preferable over [[Class instance] retain]?
  • Next by thread: RE: [[Class alloc] init] preferable over [[Class instance] retain]?
  • Index(es):
    • Date
    • Thread