Re: substringWithRange: memory leak problem
Re: substringWithRange: memory leak problem
- Subject: Re: substringWithRange: memory leak problem
- From: j o a r <email@hidden>
- Date: Tue, 27 Sep 2005 12:55:14 +0200
On 27 sep 2005, at 12.47, John Clayton wrote:
When I select "leaks" from the dropdown, and invert the display, I
get something like this:
2472 bytes in 121 nodes:
MDNXZoneMalloc
CFAllocatorAllocate
_CFRuntimeCreateInstance
__CFStringCreateImmutableFunnel3
CFStringCreateWithSubstring
-[NSCFString substringWithRange:]
-[NSString stringByTrimmingCharactersInSet:]
+[TCSProcess(Private) _processes:]
My understanding is that this is showing me objects which have
become unreachable, but please correct me if I'm wrong. I believe
it's an underlying call to substringWithRange: being performed in
stringByTrimmingCharactersInSet: that is the issue, and not my
explicit call.
Yes, that is what it will show you, but the backtrace is the
allocation event - not necessarily where it is leaked. I would look
at what you're doing with the strings passed to:
[process setUcomm:myUcomm];
[TCSProcess _parse:command intoProcess:process];
It is _highly_unlikely_ that there is a leak in a commonly used
Foundation methods such as this one - there are simply too many users
of that method for it to go unnoticed. I'm not saying that it can't
happen, just that it's much, much, more likely that it's in your code...
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