I am indexing a large set of files using Search Kit. I find that memory usage (reported by Activity Monitor) keeps growing in my app, as it indexes more documents. I don't find any memory leaks. In Instruments, I find that there can sometimes be hundreds of SKDocumentRef objects marked as living, though I would expect that I should only have one of those objects retained at a time. I guess there is something basic about memory management that I don't understand. Can anyone see something wrong with this code? Thanks
NSDirectoryEnumerator *dirEnumerator = [[NSFileManager defaultManager] enumeratorAtPath:folderToIndex]; NSString *item; while ((item = [dirEnumerator nextObject]) != nil) { //NSAutoreleasePool *innerPool = [[NSAutoreleasePool alloc] init]; NSString *fullPath = [folderToIndex stringByAppendingPathComponent: item]; NSURL *url = [NSURL fileURLWithPath: fullPath]; SKDocumentRef doc = SKDocumentCreateWithURL((CFURLRef) url); //[(id) doc autorelease]; Boolean success = SKIndexAddDocument ( (SKIndexRef) theIndex, (SKDocumentRef) doc, (CFStringRef) NULL, (Boolean) true ); if (success == false) { NSLog(@"some problem inserting the document into the database"); } CFRelease(doc); url = nil; fullPath = nil; //[innerPool release]; } _______________________________________________ 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