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