• 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
How can I release an NSString?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How can I release an NSString?


  • Subject: How can I release an NSString?
  • From: Arthur VIGAN <email@hidden>
  • Date: Sun, 19 Jan 2003 10:11:39 +0100

Hi,

I have a quite simple question, which I find annoying...
Let's consider the following method:

- (NSString *)giveMeAString
{
NSString *aString;

aString = [NSString stringWithString:@"Hello World!"];

return aString
}

My question is: is memory leaking in this code, because the string is never released? Should I use autorelease?

Thanks in advance for your answers to this basic question,

Arthur
_______________________________________________
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: How can I release an NSString?
      • From: j o a r <email@hidden>
    • Re: How can I release an NSString?
      • From: email@hidden
  • Prev by Date: Re: Using NSCell to bold cells in a tableview
  • Next by Date: Re: Spinner not working in PB
  • Previous by thread: Re: Using NSCell to bold cells in a tableview
  • Next by thread: Re: How can I release an NSString?
  • Index(es):
    • Date
    • Thread