• 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: substringWithRange: memory leak problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: substringWithRange: memory leak problem


  • Subject: Re: substringWithRange: memory leak problem
  • From: j o a r <email@hidden>
  • Date: Tue, 27 Sep 2005 07:42:58 +0200


On 27 sep 2005, at 03.33, John Clayton wrote:

MallocDebug is telling me I have a memory leak in some code like this:

How does it say that? By showing you that you generate a ton of NSString instances, and by showing you the callstack to where they were created?


Now, as far as I can tell both of those methods return an autoreleased string. And, releasing or autoreleasing either of them actually does result in bad memory access.

Could it be that you're just using this method a lot, without using a temporary autorelease pool that might be appropriate in this case?


j o a r



Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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: 
 >substringWithRange: memory leak problem (From: John Clayton <email@hidden>)

  • Prev by Date: Re: [Q] Garbage strings appened to a string
  • Next by Date: interactive command line apps
  • Previous by thread: Re: substringWithRange: memory leak problem
  • Next by thread: Re: substringWithRange: memory leak problem
  • Index(es):
    • Date
    • Thread