Re: Instruments leaks.
Re: Instruments leaks.
- Subject: Re: Instruments leaks.
- From: Fritz Anderson <email@hidden>
- Date: Sun, 12 Oct 2008 11:08:55 -0500
On 12 Oct 2008, at 10:00 AM, Sandro Noel wrote:
description is a local function variable, but at this particular
point it is getting replaced by the new assignation.
description = [description trimWhiteSpace];
and access to the pointer of the old value will be lost.
at least that's what I understand.
Yes. But the old pointer will not be released, unless it was
autoreleased or you use garbage collection.
Where did the old pointer come from? When you obtained it, did you
retain it? The retain should then be balanced with an (auto)release.
but i wonder, will the variable automatically be released when it
falls out of scope? i don't think so but i might be wrong.
i'll have to look it up in the doc again :)
No. It will not be automatically released, unless you use garbage
collection
Thank you for the language correction :) i'll remember it :)
I'm glad you took it as I intended. I worried I was rude. Your English
is very clear.
— F
--
Fritz Anderson -- Xcode 3 Unleashed: Now in its second printing -- <http://x3u.manoverboard.org/
>
_______________________________________________
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