我正在创建字典的深层可变副本,但由于某种原因出现泄漏。我试过这个:
NSMutableDictionary *mutableCopy = (NSMutableDictionary *)CFPropertyListCreateDeepCopy(kCFAllocatorDefault, sectionedDictionaryByFirstLetter, kCFPropertyListMutableContainers);
self.copyOfSectionedDictionaryByFirstLetter = mutableCopy;
CFRelease(mutableCopy);
和这个:
copyOfSectionedDictionaryByFirstLetter = (NSMutableDictionary *)CFPropertyListCreateDeepCopy(kCFAllocatorDefault, sectionedDictionaryByFirstLetter, kCFPropertyListMutableContainers);
两者都被接口生成器的泄漏设备标记。
有任何想法吗?
谢谢!