title: NSURL property with "copy" attribute. Is it leaking?
body: <p>I am just cleaning up my code a little bit and I found a few lines in a function where I am not sure if they are producing memory leaks.
  I would appreciate any ideas.</p>
  
  <p>Thanks in advance!</p>
  
  <p>In the following code the variables filepath is a NSURL and filename a NSString object defined as properties. The definition attribute is set to "copy".
  Here's the code :</p>
  
  <pre><code>-(BOOL)isEqual:(id)object
  {
      if ( self == object)
          return YES;
  
      if (!object || ![object isKindOfClass:[self class]]) 
          return NO;
  
      if ( ![[[self filepath] path] isEqual:[[object filepath] path]])
          return NO;
  
      if (![[self filename] isEqualToString:[object filename]])
          return NO;
  
      if (![[self filesize] isEqualToString:[object filesize]])
          return NO;
  
      if (![[[self filepath ] absoluteURL] isEqual:[[object filepath] absoluteURL]])
          return NO;
  
      if ( !([[[self filepath ] absoluteURL ] isFileURL ] &amp;&amp; [[[object filepath] absoluteURL ] isFileURL ]))
          return NO;
  
      return YES;
  }
  </code></pre>
  
  <p>From my understanding, a property with the copy attribute would return an object with a retain count of +1. This would mean, that I should have memory leaks on every if-statement.
  Is this correct? </p>