• 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: NSString* kMyKey = @"aKey" vs #define MYKEY @"aKey"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSString* kMyKey = @"aKey" vs #define MYKEY @"aKey"


  • Subject: Re: NSString* kMyKey = @"aKey" vs #define MYKEY @"aKey"
  • From: Andrew Farmer <email@hidden>
  • Date: Fri, 3 Apr 2009 19:51:36 -0700

On 03 Apr 09, at 15:15, Nate Weaver wrote:
IIRC they're optimized to point to the same memory location (I wasn't sure, so I tested and confirmed).

They'll point to the same object in memory within a single file, but multiple modules linked together aren't guaranteed to share string constants.
_______________________________________________


Cocoa-dev mailing list (email@hidden)

Please 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


References: 
 >NSString* kMyKey = @"aKey" vs #define MYKEY @"aKey" (From: Memo Akten <email@hidden>)
 >Re: NSString* kMyKey = @"aKey" vs #define MYKEY @"aKey" (From: Nate Weaver <email@hidden>)

  • Prev by Date: Re: Implementing NSOutlineView autosaveExpandedItems with CoreData
  • Next by Date: Re: Dragging anything out of a WebView into other Cocoa controls
  • Previous by thread: Re: NSString* kMyKey = @"aKey" vs #define MYKEY @"aKey"
  • Next by thread: Error: mutating method sent to immutable object
  • Index(es):
    • Date
    • Thread