You can use CFGetRetainCount
with Objective-C objects, even under ARC:
NSLog(@"Retain count is %ld", CFGetRetainCount((__bridge CFTypeRef)myObject));
ARC下打印retain count
时间: 2024-10-12 20:04:06
You can use CFGetRetainCount
with Objective-C objects, even under ARC:
NSLog(@"Retain count is %ld", CFGetRetainCount((__bridge CFTypeRef)myObject));
ARC下打印retain count