我正在使用ASIHTTPRequest库,我想确保从内存管理的角度来看,我是否以正确的方式使用它。 我创建:
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:someUrl];
根据命名规则,我不需要保留请求对象,对吗? 但是当我查看requestWithURL:someUrl方法的代码时,我可以看到:
+ (id)requestWithURL:(NSURL *)newURL
{
return [[[self alloc] initWithURL:newURL] autorelease];
}
所以返回的对象是自动释放的。我在代码中不应该保留它吗?