NSAutoreleasePool problem
NSAutoreleasePool problem
- Subject: NSAutoreleasePool problem
- From: Lukasz Kuczborski <email@hidden>
- Date: Thu, 14 Mar 2002 10:49:58 +0100
2002-03-14 10:46:20.262 SimpleLister[424] *** _NSAutoreleaseNoPool(): Object
0x1c74770 of class NSAllDescendantPathsEnumerator autoreleased with no pool
in place - just leaking
-> What does this error means..? I have some problems with
NSAutoreleasePool...but i don't know what to do...my method looks like this:
- (IBAction)List:(id)sender
{
int all;
NSDirectoryEnumerator *direnum = [[NSFileManager defaultManager]
enumeratorAtPath:[path stringValue]];
NSString *fullPath = [path stringValue];
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
[progress setIndeterminate:YES];
[progress startAnimation:self];
if(!(pname = [direnum nextObject]))
{
NSRunAlertPanel(@"No path selected!",@"Please choose path, and then
continue.", @"Silly Me ;-)", nil, nil);
}
else
{
fileSpecs = [[NSMutableArray alloc] init];
}
while(pname = [direnum nextObject])
{
Table *nowy = [[Table alloc] init];
[nowy setIconCell:[[NSWorkspace sharedWorkspace]
iconForFile:[fullPath stringByAppendingPathComponent:pname]]];
[nowy setPathToFile:[fullPath
stringByAppendingPathComponent:pname]];
[nowy setFileExtension:[pname pathExtension]];
[nowy setFileName:[pname lastPathComponent]];
[fileSpecs addObject:nowy];
[nowy release];
all = [fileSpecs count];
[found setIntValue:all];
[self update];
}
[list setState:NO];
if(all == 0)
{
[table reloadData];
NSRunAlertPanel(@"No files found!",@"Please try again, it
happens...:)", @"Try Again!", nil, nil);
}
[progress stopAnimation:self];
[progress setIndeterminate:NO];
[pool release];
}
TIA,
Lukasz
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.