• 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: Instruments leaks.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Instruments leaks.
      • From: "Michael Ash" <email@hidden>
References: 
 >Instruments leaks. (From: Sandro Noel <email@hidden>)
 >Re: Instruments leaks. (From: j o a r <email@hidden>)
 >Re: Instruments leaks. (From: Sandro Noel <email@hidden>)
 >Re: Instruments leaks. (From: j o a r <email@hidden>)
 >Re: Instruments leaks. (From: Sandro Noel <email@hidden>)
 >Re: Instruments leaks. (From: Fritz Anderson <email@hidden>)
 >Re: Instruments leaks. (From: Sandro Noel <email@hidden>)

  • Prev by Date: Re: Read-only properties
  • Next by Date: Drawing?
  • Previous by thread: Re: Instruments leaks.
  • Next by thread: Re: Instruments leaks.
  • Index(es):
    • Date
    • Thread