现需下载2个G的视频文件,以下哪个方法不合理?
[NSData dataWithContentsOfURL:url];
[NSURLConnection connectionWithRequest:request delegate:self];
<div>[NSURLConnection sendAsynchronousRequest: request queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse <em>response, NSData </em>data, NSError *connectionError) {}];</div>
获取到一部分data的时候就写入沙盒中,然后释放内存中的data。