NSMutableArray leaks
I am trying the create a NSMutableArray by reading the contents of a file.
NSString *filePath = FILE_PATH;
NSMutableArray *tempArr = [[NSMutableArray alloc] initWithContentsOfFile:filePath];
...
[tempArr release];
But i am getting memory leaks in the line where i am alloca开发者_高级运维ting the array.
What is the bug in the code ?
Thanks
As Vladimir said the problem is between those lines. Leaks showing the leak where the variable was created. But in fact you're over-retaining that array somewhere. double check your code.
精彩评论