Re: Using NSMutableString* for NSString* result
Re: Using NSMutableString* for NSString* result
- Subject: Re: Using NSMutableString* for NSString* result
- From: Chris Hanson <email@hidden>
- Date: Fri, 3 Oct 2003 12:16:14 -0500
On Friday, October 3, 2003, at 11:56 AM, Alastair J.Houghton wrote:
Or just
return [myMutableString copy];
Don't. The convention is that returned objects from any method that
isn't an alloc or copy method should be considered autoreleased.
Corrected to follow the convention, the above would be "return
[[myMutableString copy] autorelease];" instead.
-- Chris
--
Chris Hanson, bDistributed.com, Inc. | Email: email@hidden
Custom Mac OS X Development | Phone: +1-847-372-3955
http://bdistributed.com/ | Fax: +1-847-589-3738
http://bdistributed.com/Articles/ | Personal Email: email@hidden
_______________________________________________
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.