• 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: Memory management question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory management question


  • Subject: Re: Memory management question
  • From: Randall Meadows <email@hidden>
  • Date: Wed, 24 Mar 2004 13:43:58 -0500

At 12:40 PM -0500 3/24/04, Randall Meadows wrote:

line = [line stringByTrimmingCharactersInSet:...];

I now notice that NSMutableString has setString: available. Would it be more efficient to do

[[line setString:[line stringByTrimmingCharactersInSet:...];

instead of creating a new object each time? That should trim down the number of objects in my autorelease pool, right (which, at times, can be a lot, which is why I'm using a number of nested autorelease pools)?
_______________________________________________
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: Memory management question
      • From: Kevin Ballard <email@hidden>
  • Prev by Date: Why isn't my NSComboBox editable?
  • Next by Date: Re: Memory management question
  • Previous by thread: Re: Memory management question
  • Next by thread: Re: Memory management question
  • Index(es):
    • Date
    • Thread