• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Using NSMutableString* for NSString* result
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Using NSMutableString* for NSString* result
      • From: "Alastair J.Houghton" <email@hidden>
References: 
 >Re: Using NSMutableString* for NSString* result (From: "Alastair J.Houghton" <email@hidden>)

  • Prev by Date: Re: Using NSMutableString* for NSString* result
  • Next by Date: [ANN]TDCBTableCells Palette v1.3
  • Previous by thread: Re: Using NSMutableString* for NSString* result
  • Next by thread: Re: Using NSMutableString* for NSString* result
  • Index(es):
    • Date
    • Thread