• 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: "Constant" strings are static or autoreleased?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "Constant" strings are static or autoreleased?


  • Subject: Re: "Constant" strings are static or autoreleased?
  • From: Lance Bland <email@hidden>
  • Date: Wed, 5 Mar 2003 15:53:28 -0500

On Wednesday, March 5, 2003, at 03:23 PM, sinclair44 wrote:

> Doing
>
> NSString *myString = @"string";
>
> Is the same as
>
> NSString *myString = [NSString stringWithCString:"string"];
>
> In both cases, myString is an autoreleased, *immutable* instance of
> NSString.

This:

NSString *aString = @"ddd";
NSString *myString = [NSString stringWithCString:"string"];

gives this:

2003-03-05 15:52:10.295 xx[1255] [aString retainCount]: 4294967295
2003-03-05 15:52:10.298 xx[1255] [myString retainCount]: 1

Indicating that is not true.

-lance
------------------------------------
Lance Bland
mailto:email@hidden
VVI Is The #1 Visual-Report Tool Developer For Mac OS X
http://www.vvi.com
_______________________________________________
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: "Constant" strings are static or autoreleased?
      • From: sinclair44 <email@hidden>
References: 
 >Re: "Constant" strings are static or autoreleased? (From: sinclair44 <email@hidden>)

  • Prev by Date: Re: Resizing an NSOpenGLView
  • Next by Date: Re: Getting information about volumes
  • Previous by thread: Re: "Constant" strings are static or autoreleased?
  • Next by thread: Re: "Constant" strings are static or autoreleased?
  • Index(es):
    • Date
    • Thread