title: ARC and CFRelease?
body: <p>I'm slightly confused. Everywhere I've read, suggest that when using ARC, you still need to release core foundation objects which makes sense, ARC doesn't manage them. However, I've got a method which uses some CF methods/objects which I used <code>CFRelease</code> on, but that then caused the app to crash. Uncommenting my <code>CFRelease</code>s fixes the issue but then I'm assuming I've got a memory leak?</p>
  
  <p>Could someone please explain which things need releasing and which don't, or anything else that's wrong with this code?</p>
  
  <pre><code>+ (NSString *) fileExtensionForMimeType:(NSString *)type
  {
      CFStringRef mimeType = (__bridge CFStringRef)type;
      CFStringRef uti = UTTypeCreatePreferredIdentifierForTag(kUTTagClassMIMEType, mimeType, NULL);
      CFStringRef extension = UTTypeCopyPreferredTagWithClass(uti, kUTTagClassFilenameExtension);
  
      NSString *ext = (__bridge NSString *)extension;
  
      // CFRelease(mimeType);
      // CFRelease(uti);
      // CFRelease(extension);
  
      return ext;
  }
  </code></pre>
  
  <p>The three commented out <code>CFRelease</code> calls fix the issue as mentioned, but I know it's wrong. What should I be doing?</p>