Le 26 déc. 2010 à 09:05, Richard Frith-Macdonald a écrit :

> Author: rfm
> Date: Sun Dec 26 09:05:52 2010
> New Revision: 31778
> 
> URL: http://svn.gna.org/viewcvs/gnustep?rev=31778&view=rev
> Log:
> fix leak
> 
> Modified:
>    libs/base/trunk/ChangeLog
>    libs/base/trunk/Source/NSString.m

Thanks for the fix Richard.

I just lazily copied the code located above and this code seems similarly 
incorrect to me:

- (NSString*)stringByReplacingOccurrencesOfString: (NSString*)replace
                                       withString: (NSString*)by
                                          options: (NSStringCompareOptions)opts
                                            range: (NSRange)searchRange
{
  id copy = [self mutableCopy];
  
[copy replaceOccurrencesOfString: replace
                        withString: by
                           options: opts
                             range: searchRange];
  
return [copy makeImmutableCopyOnFail: NO];
}

Cheers,
Quentin.



_______________________________________________
Gnustep-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to