0
我无法找到一种方法来摆脱下面的代码内存泄漏。请帮忙。NSMutableDictionary内存泄漏
// Data Transfer from pList and temp & dict Creation ---------------------------------------------
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; // pool is created
//Path get the path to Data.plist
NSString *path=[[NSBundle mainBundle] pathForResource:@"Data" ofType:@"plist"];
//Next create the temp dictionary from the contents of the file
NSMutableDictionary *temp=[NSMutableDictionary dictionaryWithContentsOfFile:path];
//Copy from temp and init dict
dict = [[NSMutableDictionary alloc]initWithDictionary:temp];
[pool drain];
我有[dict发布]; on - (void)dealloc和另一个地方,当使用它的程序循环结束时,但Instruments Leaks保持指向我提供的代码泄漏...感谢Dave – 2011-05-04 00:27:37