我的代码中没有使用任何NSURL
API,但Xcode Instruments表示我的代码有很多__CFCachedURLResponse
内存泄漏。
例如,
Leaked Object # Address Size Responsible Library Responsible Frame
__CFCachedURLResponse,10 < multiple > 320 Bytes IPhoneUIBase
-[InterestGroupStockTR_RTS composeRTSData:]
代码是在创建向数组添加几个对象之后,然后调用自定义类。
NSMutableArray *arrCodes = [[NSMutableArray alloc] init];
for(int j = 0; j < countCode; j++ )
{
NSDictionary *pData = [listData objectAtIndex:j];
NSString *stockCode = [ NSString stringWithFormat:@"%@", pData ];
NSMutableDictionary *codeData2 = [[NSMutableDictionary alloc] initWithObjectsAndKeys:stockCode , @"acCode" , NULL ];
[arrCodes addObject:codeData2];
[codeData2 release];
}
[trData.dict setObject:arrCodes forKey:@"MULTI_SBR_ARRAYRP"];
[self requestWithData:trData];
[arrCodes removeAllObjects];
[arrCodes release];
__CFCachedURLResponse
和__CFURLCacheNode
之间的区别是什么?根据仪器,一些类有__CFURLCacheNode
内存泄漏。由于