Hi, I noticed an issue in my code related to NSFileManager. When running my program with gmalloc, I got a seg fault. I traced the cause back to NSFileManager and wrote a simple reproducible program to illustrate the issue. Can one of the gurus here point out a flaw, or is this a real bug?
#import <Cocoa/Cocoa.h> int main(int argc, char **argv) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSFileManager *manager = [NSFileManager defaultManager]; NSString *path = @"/Applications"; NSDirectoryEnumerator *enumerator = [manager enumeratorAtPath:path]; for (id fileName in enumerator) { NSAutoreleasePool *loopPool = [[NSAutoreleasePool alloc] init]; NSString *file = [path stringByAppendingPathComponent:fileName]; NSDictionary *attrs = [manager fileAttributesAtPath:file traverseLink:YES]; [loopPool drain]; } [pool drain]; return 0; } Cheers, -Tim *********************************************************************** This e-mail and its attachments are confidential, legally privileged, may be subject to copyright and sent solely for the attention of the addressee(s). Any unauthorized use or disclosure is prohibited. Statements and opinions expressed in this e-mail may not represent those of Radialpoint. Le contenu de ce courriel est confidentiel, privilégié et peut être soumis à des droits d'auteur. Il est envoyé à l'intention exclusive de son ou de ses destinataires. Il est interdit de l'utiliser ou de le divulguer sans autorisation. Les opinions exprimées dans le présent courriel peuvent diverger de celles de Radialpoint. _______________________________________________ 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