当我反复调用apple80211GetInfoCopy()时,为了跟踪RSSI,内存泄漏。
CFDictionaryRef info = NULL;
apple80211GetInfoCopy( airportHandle, &info ); // read WIFI info including RSSI from iOS
答案 0 :(得分:0)
我解决了它:
CFDictionaryRef info = NULL;
apple80211GetInfoCopy( airportHandle, &info ); // read WIFI info including RSSI from iOS
[info release];
答案 1 :(得分:0)
由于函数apple80211GetInfoCopy()
的名称包含单词" copy",您拥有它返回的对象,并且当您不再需要它时,您有责任释放它。您可以致电CFRelease(info)
。
(如果出现这种情况,请查看Apple Memory Management Policy。)