Re: [[Class alloc] init] preferable over [[Class instance] retain]?
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