memory leak in nsarray
can any one please tell me whats causing the memory leak.
Data_Parser is an NSObject class. This clas开发者_高级运维s parses xml file and the values are stored in a NSMutableArray tList.
Thanks
You're allocating a mutable array in line 46 and assigning it to ar
:
NSMutableArray * ar = [[NSMutableArray alloc] init];
and then in line 48 you're assigning something else to ar
. That loses the original array you allocated, which you never use or release. (The code doesn't leak if the for
loop doesn't run due to en empty parser list, but the analyzer is showing you where it will.)
精彩评论