On Aug 7, 2009, at 13:05, Tim Murison wrote:

In my real application I have a memory leak that I can trace to operations not being release by the operation queue. This program is meant to show that
in the simplest way possible.

I really don't think it shows that at all. If your analysis is correct, this code might show that you are able to outrun the collector by 1MB/sec, but that's about all.

If you're trying to demonstrate a leak, you'll have to bring the application (or at least the relevant section of code) back to a quiescent state before analyzing the memory usage. What happens if you stop creating operations after (say) 10 seconds? Is the questionable 10MB still in use a couple of seconds later, or did the memory usage drop back down? If it's still in use, you might well be able to use Instruments to find out what it is.

If you're trying to determine why there are so many threads, you're at least going to have to classify (or count) threads according to their status: waiting to execute, executing, finished executing. Large numbers of waiting or finished threads may be nothing more sinister than an artifact of your artificial test.


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to