NSURLConnection *connection 是类的属性
@property (nonatomic, retain) NSURLConnection *connection;
Instruments 报告说我在下面代码的第二行中泄漏了一个 NSURLConnection 对象。
NSURLRequest *request = [[NSURLRequest alloc] initWithURL:_url];
self.connection = [[NSURLConnection alloc] initWithRequest:request delegate:self];
[request release];
在didFinishLoading
和didFinishWithError
委托选择器中,我正在释放连接并设置为 nil
[self.connection release];
self.connection = nil;
我读过“NSURLConnection 泄漏?” 帖子和其他几个。我觉得我一定错过了一些非常明显的东西。帮助?