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

2010-03-11 Thread Matt Neuburg
On Tue, 9 Mar 2010 23:58:55 +, Jeff Laing said: >The upshot was that apparently the iPhone developers like you to avoid the use of autorelease pools where possible. One hidden difference in the above is that in the first case you have (probably) populated the autorelease pool and in the other

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

2010-03-09 Thread Jeff Laing
> For example, is: > > NSMutableArray *anArray = [[NSMutableArray array] retain]; > > better than: > > NSMutableArray *anArray = [[NSMutableArray alloc] init]; I've been reamed, in the recent past, for expressing the opinion that the first was just as good as the second - apparently the answer

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

2010-03-09 Thread Sean McBride
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 *a

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

2010-03-09 Thread Nick Zitzmann
On Mar 9, 2010, at 2:50 PM, Alexander Spohr wrote: > I’d use > NSMutableArray *anArray = [NSMutableArray new]; > in this case ;) FWIW, I prefer to use alloc-init for one main reason: When I want to look for places in the code that initialize certain objects (which does happen in large code bas

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

2010-03-09 Thread Alexander Spohr
Am 09.03.2010 um 22:44 schrieb Luke the Hiesterman: > > On Mar 9, 2010, at 1:41 PM, Laurent Daudelin wrote: > >> 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 = [

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

2010-03-09 Thread Luke the Hiesterman
On Mar 9, 2010, at 1:41 PM, Laurent Daudelin wrote: > 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]; There is no reason to use this wh