Version: 1.2

Posted: 2009-09-11

Build Requirements: Xcode 3.0

Runtime Requirements: Mac OS X 10.5

View Source Code:

Download Sample Code (“NSOperationSample.zip”, 67.4K)



Description

"NSOperationSample" is a Cocoa application that demonstrates how to use NSOperation and NSOperationQueue classes. It encapsulates specific tasks like searching the file system for certain image files. One NSOperation is created for recursively searching a given directory, other NSOperation instances are then created for each image file found. It uses NSOperationQueue to manage these operations so users can stop the search and give the primary search operation more time to execute.

Document Revision History

Date Notes
2009-09-11Fixed a memory leak, some code reformatting.
2007-06-11Updated to use NSFileManager to iterate through directories for image files.
2007-05-31Demonstrates how to use the NSOperation and NSOperationQueue classes.