Skip to content

Instantly share code, notes, and snippets.

@jspahrsummers
Created November 1, 2012 07:58
Show Gist options
  • Save jspahrsummers/3992377 to your computer and use it in GitHub Desktop.
Save jspahrsummers/3992377 to your computer and use it in GitHub Desktop.
Autoreleasing a CFType
// Assumes 'value' is retained.
CFTypeRef value = NULL;
__autoreleasing obj __attribute__((objc_precise_lifetime)) = CFBridgingRelease(value);
return (__bridge CFTypeRef)obj;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment