title: initWithContentsOfURL leaks memory within NSOperation subclass. Anyone else seeing this?
body: <p>I have been living on Instruments for last few hours staring at a puzzling memory leak. I have isolated it to this single line of code in an NSOperation subclass I wrote:</p>
  
  <pre><code>NSData *myData = [[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:myURLString]];
  </code></pre>
  
  <p>Periodically this will leak 3500 bytes. Is anyone else seeing this? If so, is there a work around?</p>
  
  <p>Thanks in advance.</p>
  
  <p>UPDATE:</p>
  
  <p>Here is the relevant section of code within the main() body of my NSOperation subclass:</p>
  
  <pre><code>- (void)main {
  
  // ...
  
  NSData *sequenceData = 
  [[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:concatenatedURLString]];
  
  NSString *sequenceString = 
  [[NSString alloc] initWithBytes:[sequenceData bytes] length:[sequenceData length] encoding:NSUTF8StringEncoding];
  
  NSDictionary *result = [NSDictionary dictionaryWithObjectsAndKeys:
  self.chromosome, @"chromosome",
  [NSNumber numberWithInt:self.basepairStart], @"basepairStart", 
  [NSNumber numberWithInt:self.basepairEnd], @"basepairEnd", 
  sequenceData, @"sequenceData", 
  sequenceString,  @"sequenceString", 
  nil];
  
  [sequenceData   release];
  [sequenceString release];
  
  [self.target performSelectorOnMainThread:self.action withObject:result waitUntilDone:NO];
  
  
  }
  </code></pre>
  
  <p>As you can see sequenceData and sequenceString are properly released. Also, I have confirmed that all ivars of this subclass (chromosome. etc.) are properly memory managed.</p>
  
  <p>-Doug</p>