title: Tracking download progress with UIProgressView and ASIHTTPRequest
body: <p>I'm using ASINetworkQueue to download a series of images to be displayed in a particular view. </p>
  
  <p>Mi problem is when I open the view and then close it right away, before the request finishes, it takes a while when the UIProgressView is attempted to updated, and then it crashes (EXC_BAD_ACCESS) as it doesn't exist anymore (the view was dismissed). I tried setting the delegate to nil before unloading the view but it doesn't help. </p>
  
  <p>This is the part of the code in charge of creating the queue and adding the requests</p>
  
  <pre><code>- (void)doNetworkOperations
  {
      // Stop anything already in the queue before removing it
      [[self networkQueue] cancelAllOperations];
  
      // Creating a new queue each time we use it means we don't have to worry about clearing delegates or resetting progress tracking
      [self setNetworkQueue:[ASINetworkQueue queue]];
      [[self networkQueue] setDelegate:self];
  
      // if I have little files to download, use accurate progress
      // if I have lots, it's not worth it.
      if ([promosInfo count]&lt;=4) {
          [[self networkQueue] setShowAccurateProgress:YES];
      }
      [[self networkQueue] setDownloadProgressDelegate:progressControl];
      [[self networkQueue] setRequestDidFinishSelector:@selector(requestFinished:)];
      [[self networkQueue] setRequestDidFailSelector:@selector(requestFailed:)];
      [[self networkQueue] setQueueDidFinishSelector:@selector(queueFinished:)];
  
      NSInteger i=0;
      for (id row in promosInfo){
          NSURL *url = [NSURL URLWithString: [row objectForKey:@"imgSource"]];
          ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL: url];
          [request setTag:i];
          [[self networkQueue] addOperation:request];
          i++;
          url = nil;
          request = nil;
      }
  
      [[self networkQueue] go];
  }
  </code></pre>
  
  <p>And I have the following viewDidUnload</p>
  
  <pre><code>- (void)viewDidUnload
  {
      [[self networkQueue] setDownloadProgressDelegate:nil];
      [[self networkQueue] cancelAllOperations];
      [self setNetworkQueue:nil];
      [self setCargando:nil];
      [self setScrollView:nil];
      [self setPageControl:nil];
      [self setStatusLabel:nil];
      [self setProgressControl:nil];
      [super viewDidUnload];
      // Release any retained subviews of the main view.
      // e.g. self.myOutlet = nil;
  }
  </code></pre>
  
  <p>How do I tell the ASINetworkQueue to stop tracking progress? As I mentioned, I tried setting the delegate to nil but it didn't seem to work.</p>