1.在非arc的情况下id和void *可以互相转换
id p = nil;
void * = p; (no problem)
2.在arc的情况下id和void *不能互相转换
id p = nil;
void * = p; (error)
需要__bridge进行转换
id obj = [[NSObject alloc] init];
void *p = (__bridge void *)obj;
id o = (__bridge id)p;
__bridge_retained 在转换的同时引用计数加1
id obj = [[NSObject alloc] init];(引用计数为1)
void *p = (__bridge_retained void *)obj;(引用计数为3)
__bridge_transfer 在转换的同时释放当前的对象
id obj = [[NSObject alloc] init];(引用计数为1)
void *p = (__bridge_transfer void *)obj;(引用计数为1)