Re: Using NSMutableString* for NSString* result
Re: Using NSMutableString* for NSString* result
- Subject: Re: Using NSMutableString* for NSString* result
- From: Jeff Gilbert <email@hidden>
- Date: Fri, 03 Oct 2003 13:49:40 -0500
The difference between these two is that [NSString stringWithString:myMutableString] is an autoreleased object, whereas [myMutableString copy] will have an extra reference added which needs to be released by the caller.
Jeff Gilbert
On Friday, October 03, 2003, at 11:56AM, Alastair J.Houghton <email@hidden> wrote:
>
On Friday, October 3, 2003, at 05:04 pm, Laurent Daudelin wrote:
>
>
> return [NSString stringWithString:myMutableString]
>
>
Or just
>
>
return [myMutableString copy];
>
>
(You'd need to use -mutableCopy to get another NSMutableString.)
>
>
Kind regards,
>
>
Alastair.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.