bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GDL2 - patches for OSX (2)


From: Manuel Guesdon
Subject: Re: GDL2 - patches for OSX (2)
Date: Wed, 26 Mar 2003 09:45:54 +0100 (CET)

Hi Stéphane,

On Tue, 25 Mar 2003 23:00:42 +0100 Stéphane Corthésy <stephane@sente.ch> wrote:
 >| Index: EOOrQualifier.m
 >| ===================================================================
 >| RCS file: 
 >| /cvsroot/gnustep/gnustep/dev-libs/gdl2/EOControl/EOOrQualifier.m,v
 >| retrieving revision 1.7
 >| diff -r1.7 EOOrQualifier.m
 >| 56c56
 >| <   return [[[self alloc] initWithQualifierArray: array] autorelease];
 >| ---
 >|  >   return AUTORELEASE([[self alloc] initWithQualifierArray: array]);
 >| 89c89
 >| <   NSMutableArray *qualArray = [NSMutableArray array];
 >| ---
 >|  >   NSMutableArray *qualArray = [[NSMutableArray alloc] init];


For this one, I usually prefer: 
        NSMutableArray *qualArray = (NSMutableArray*)[NSMutableArray array];
because:
        o we don't need to know how NSMutableArray make it's allocation and 
initialization
        o if we want to track memory leaks, it's easier to make a grep on alloc 
and check cases 
if there's not too much ones (i.e. if alloc are mainly done in objects 
constructors).


Manuel



--
______________________________________________________________________
Manuel Guesdon - ORANGE CONCEPT <mguesdon@orange-concept.com>
14 rue Jean-Baptiste Clement  -  93200 Saint-Denis  -  France
Tel: +33 1 4940 0997  -  Fax: +33 1 4940 0998





reply via email to

[Prev in Thread] Current Thread [Next in Thread]