Skip to content

Instantly share code, notes, and snippets.

@farktronix
Last active December 17, 2015 15:39
Show Gist options
  • Save farktronix/5633014 to your computer and use it in GitHub Desktop.
Save farktronix/5633014 to your computer and use it in GitHub Desktop.
static void _MemoryPoolReleaseCallback (CFAllocatorRef allocator, const void *value) {
if (value != NULL) CFRelease((CFTypeRef)value);
}
static CFArrayCallBacks MyMemoryPoolCallbacks = {
0,
NULL,
&_MemoryPoolReleaseCallback,
&CFCopyDescription,
NULL
};
CFArrayRef pool = CFArrayCreateMutable(NULL, 0, &MyMemoryPoolCallbacks);
/* Blackout */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment