Re: Strange Memory leak
Re: Strange Memory leak
- Subject: Re: Strange Memory leak
- From: j o a r <email@hidden>
- Date: Tue, 16 May 2006 22:20:38 +0200
On 16 maj 2006, at 21.50, Jerrod Fowkes wrote:
I have spent the greater part of the day figuring out a memory
leak. I think I have found it. Before this code gets called, I call
a web service asyncronously and I loop until it calls my delegate,
and I set the result in there. When it returns it comes back to the
code above. the retain count of 2 is correct, when it unschedules
the runloop, it's 3, which isn't correct. Why would *Unschedule*
mess around with my result memory?
Tracking retain count is not an effective way to find memory leaks,
or other memory management problems. You should only care about
keeping your end of the Cocoa memory management agreement - ie.
basically keep retain and release balanced. Don't spend time on
peeking at things that are implementation details of the frameworks
that you use.
There are tools and techniques that are better suited for finding
memory leaks in an structured and effective way:
<http://developer.apple.com/documentation/Performance/Conceptual/
ManagingMemory/Articles/FindingLeaks.html>
In particular, I like the "leaks" command line utility.
I'm not sure how easy they would be to find, but there are also a lot
of threads on this topic in the list archives:
<http://www.cocoabuilder.com/>
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