Under ARC (Automatic Reference Counting), there are some things to note when passing pointers between Objective C and C codes.
When passing Objective C object pointer to C function:
void* cptr = (__bridge void*)objcptr;
And back
ObjCClass *objcptr = (__bridge ObjCClass*)cptr;
References
No comments:
Post a Comment