I have a multithreaded application with several NSOperationQueues and it appears as if under heavy load conditions I'm overwhelming the garbage collector so-to-speak.

I essentially have three queues which can be processing different types of operations simultaneously.

- If I load up *one* queue with a bunch of operations and let it run, I find that memory is clean up very nicely. After each operation finishes it gets cleaned up by the collector appropriately.

- If I load up all three queues simultaneously (a not uncommon user scenario for this application), then I find that rarely do any of the operations get cleaned up. Things generally start out alright, but then get jugged up and very quickly the application can run out of memory.

I've tried suspending one of the operation queues for a few seconds and asking the garbage collector to collect, but that didn't work.

I noticed in NSGarbageCollector.h that they say, "collects ..., but subject to interruption on user input". What exactly is "user input"? If I somehow block everything on the main thread for a short time, will this allow the garbage collector to collect?

The GC release notes suggest that it's possible to "outrun" the collector,
http://developer.apple.com/releasenotes/Cocoa/GCReleaseNotes/index.html

Thanks,
Jeffrey
_______________________________________________

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