我的项目正在使用自动引用计数,我想要使用以下辅助功能API函数:
extern AXError AXUIElementCopyAttributeValue (
AXUIElementRef element,
CFStringRef attribute,
CFTypeRef *value);
要调用该函数,我会这样做:
NSArray *subElements = nil;
AXUIElementCopyAttributeValue(..., (CFArrayRef *)&subElements);
然而,ARC关于最后一个参数抛出了以下错误:
error: Automatic Reference Counting Issue: Cast of an indirect pointer to an Objective-C pointer to 'CFArrayRef *' (aka 'const struct __CFArray **') is disallowed with ARC
我该如何解决这个问题?