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

NSString memory management question


  • Subject: NSString memory management question
  • From: Rick Mann <email@hidden>
  • Date: Tue, 22 Apr 2008 15:25:35 -0700

I wrote a routine that creates a CFStringRef from some USB calls. I use it like this:

	NSString* s = (NSString*) createStringDescriptor(dev, stringIndex);
	[mSerialNumberDisplay setStringValue: [s lowercaseString]];
	[s release];


Two main questions: am I right to release the bridged NSString* s? and, what happens in -lowercaseString? How does that get released?


TIA,
--
Rick

_______________________________________________

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


  • Follow-Ups:
    • Re: NSString memory management question
      • From: Uli Kusterer <email@hidden>
    • Re: NSString memory management question
      • From: "Shawn Erickson" <email@hidden>
  • Prev by Date: Re: Using OSMemoryBarrier() with KVO
  • Next by Date: Re: GUI Time Field
  • Previous by thread: Re: Saving NSTextView data to CoreData without ending editing
  • Next by thread: Re: NSString memory management question
  • Index(es):
    • Date
    • Thread