title: Why does the Xcode 4.5 static analyzer tell me that I have a potential memory leak when I try to use __attribute__((NSObject))
body: <p>I have a property that holds a Core Foundation object, specifically a CFHTTPMessageRef. I've tried using the <strong>attribute</strong>((NSObject)) macro to tell the compiler to treat the referenced object as a normal NSObject and handle the retaining and releasing of that object for me rather than having to CFRelease myself. I've tried changing the property to weak instead of strong, but nothing seems to work, the static analyzer still tells me I have a memory leak, and from the looks of the output from CFGetRetainCount, it would that it's right. Does anyone know why my property would cause a memory leak:</p>
  
  <pre><code>typedef __attribute__((NSObject)) CFHTTPMessageRef HTTPMessageRef;
  
  @interface ABRemoteConnection : NSObject
  @property (strong) HTTPMessageRef message;
  @end
  
  - (void)dataReceived:(NSNotification *)notification {
      self.message = CFHTTPMessageCreateEmpty(kCFAllocatorDefault, TRUE);
  
      // do some stuff and if the message is complete, use it and release the 
      // message object
      if (messageIsComplete(self.message)) {
           self.message = NULL;
      }
  }
  </code></pre>