2
我有这样的方法:iPhone - 是ASIHTTPRequest线程安全吗?
-(void)updateSomething
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSURL *url = [NSURL URLWithString:@"some url"];
ASIFormDataRequest *httpRequest = [ASIFormDataRequest requestWithURL:url];
[httpRequest startSynchronous];
//some other stuff
[pool drain];
}
我呼吁applicationDidFinishLaunching
这种方法,如果我把它叫做主线程上,它工作正常
[self getMyItems];
但是,当我把它在一个单独的线程我得到一个“程序接收到的信号:‘EXC_BAD_ACCESS’
[self performSelectorInBackground:@selector(getMyItems) withObject:nil];
不知道如何解决这个问题