Objective-C ARC下获取引用计数(RetainCount)

  • CFGetRetainCount
CFGetRetainCount((__bridge CFTypeRef)(object)) 
  • KVC
[object valueForKey:@"retainCount"]  
  • 私有API
OBJC_EXTERN int _objc_rootRetainCount(id);  
_objc_rootRetainCount(object)  

你可能感兴趣的:(Objective-C ARC下获取引用计数(RetainCount))