• 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: Memory management of NSStrings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory management of NSStrings


  • Subject: Re: Memory management of NSStrings
  • From: Finlay Dobbie <email@hidden>
  • Date: Sun, 10 Apr 2005 14:00:58 +0100

On Apr 10, 2005 12:43 PM, John James <email@hidden> wrote:
>     rpt = [rpt stringByAppendingString : objectString];
> where objectString is built up in a similar way to make an report record.
>
> However it seems from my reading I should give a "[rpt autorelease]" before
> I return,

You did not alloc, copy or retain the value which is assigned to rpt.
As a result, you do not need to (auto)release it.

See:
<http://www.stepwise.com/Articles/Technical/2001-03-11.01.html>
<http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/index.html>

 -- Finlay
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Memory management of NSStrings (From: John James <email@hidden>)

  • Prev by Date: Re: Getting Current System Version
  • Next by Date: scrolling down a page in table view
  • Previous by thread: Re: Memory management of NSStrings
  • Next by thread: Re: Memory management of NSStrings
  • Index(es):
    • Date
    • Thread