Never ending lack of memory
Never ending lack of memory
- Subject: Never ending lack of memory
- From: Lorenzo Puleo <email@hidden>
- Date: Sat, 08 Mar 2003 19:53:29 +0100
I call the following recursive routine
[self ScanSingleFolder:@"/"]; (see below)
and the Terminal top command reports and increasing RSize of 80, 90,...
400...MB. My application grows 4MB each second. I get I lot of pageins and
pageouts, and up above, even if I stop the task, I have to wait long time to
free up the CPU again, and last, this amount of RSize never decreases.
Where did I do wrong?
- (BOOL)ScanSingleFolder:(NSString*)sourceDir
{
int i;
NSMutableString *subItem = [NSMutableString string];
BOOL isDir;
NSArray *dirContent = [manager
directoryContentsAtPath:sourceDir];
for(i = 0; i < [dirContent count]; i++){
if(isCopying == NO) break;
[subItem setString:[sourceDir
stringByAppendingPathComponent:[dirContent objectAtIndex:i]]];
[manager fileExistsAtPath:subItem isDirectory:&isDir];
if(isDir) [self ScanSingleFolder2:subItem];
}
return YES;
}
Thank you for your (hopefully) help.
--
Lorenzo Puleo
mailto:email@hidden
_______________________________________________
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.