[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnustep-cvs] r31778 - in /libs/base/trunk: ChangeLog Source/NSStrin
From: |
Quentin Mathé |
Subject: |
Re: [Gnustep-cvs] r31778 - in /libs/base/trunk: ChangeLog Source/NSString.m |
Date: |
Sun, 26 Dec 2010 21:08:27 +0100 |
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.
- Re: [Gnustep-cvs] r31778 - in /libs/base/trunk: ChangeLog Source/NSString.m,
Quentin Mathé <=