(NSThread) crash after pool release
(NSThread) crash after pool release
- Subject: (NSThread) crash after pool release
- From: email@hidden
- Date: Thu, 22 Aug 2002 13:06:09 +0200
I have a little problem here that I haven't run into before.
After finishing all the code in a thread I've created I release all the
objects I alloc and the NSAutoreleasePool as last the one.
When I do this I get a EXC_BAD_ACCESS and has exited due to signal 11
(SIGSEGV) error.
It runs until I release the pool (according to the docs I have to do
this manually, right?)
So why should it crash, am i overlooking something???
Thanks,
Erick
- (void)copyData:(NSFileHandle*)handle {
NSAutoreleasePool *pool=[[NSAutoreleasePool alloc] init];
NSRange whereTime,whereMS,copyRange;
NSString *temp;
NSString *string=[[NSString alloc] initWith
Data:[handle
readDataToEndOfFile] encoding:NSASCIIStringEncoding];
temp = [[NSString alloc] init];
whereTime = [string rangeOfString:@"time="
options:NSCaseInsensitiveSearch];
NSLog(@"%d",whereTime);
whereMS = [string rangeOfString:@" ms"
options:NSCaseInsensitiveSearch];
NSLog(@"%d",whereMS);
copyRange = NSMakeRange(whereTime.location +
whereTime.length+1,whereMS.location- 1 - (whereTime.location +
whereTime.length));
temp = [string substringWithRange: copyRange];
[timeText setString:temp];
[temp release];
[string release];
[pool release];
}
_______________________________________________
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.