Re: Memory management of NSStrings
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