Last active
July 31, 2023 17:25
-
-
Save dpogue/c3d8ac1cf649c7923ea29d5c83eb0b3b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <CoreFoundation/CoreFoundation.h> | |
#include <stdio.h> | |
int main(int argc, char** argv) | |
{ | |
CFStringRef str = CFStringCreateWithCString(NULL, argv[0], kCFStringEncodingUTF8); | |
printf("Ref Count: %d\n", CFGetRetainCount(str)); | |
return 0; | |
} | |
// Build with: | |
// $ clang -o cftest cftest.c -framework CoreFoundation | |
// | |
// Run with: | |
// $ ./cftest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment