• 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: RS: appendFormat allocation implications
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RS: appendFormat allocation implications


  • Subject: Re: RS: appendFormat allocation implications
  • From: Dominik Pich <email@hidden>
  • Date: Sun, 3 Jun 2007 04:03:45 +0200

Appended strings are retained by the String object and inherit its lifetime.

On Jun 3, 2007, at 3:46 AM, Roland Silver wrote:

A question about the NSMutableString method appendFormat:

Does the "constructed string" which is added to the receiver exist as an allocated object after the appendFormat is complete?

E.g. after performing
	NSMutableString* s = [[NSMutableString stringWithString:@"foo"];
	[s appendFormat:@"%c", 'a'];

is there a garbage string @"a" floating around, waiting to be autoreleased?

--Roland

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: RS: appendFormat allocation implications
      • From: Bill Bumgarner <email@hidden>
References: 
 >RS: appendFormat allocation implications (From: Roland Silver <email@hidden>)

  • Prev by Date: RS: appendFormat allocation implications
  • Next by Date: Re: Enabling NSButton
  • Previous by thread: RS: appendFormat allocation implications
  • Next by thread: Re: RS: appendFormat allocation implications
  • Index(es):
    • Date
    • Thread