Reputation: 1503
can any one please tell me whats causing the memory leak.
Data_Parser is an NSObject class. This class parses xml file and the values are stored in a NSMutableArray tList.
Thanks
Upvotes: 0
Views: 89
Reputation: 71048
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.)
Upvotes: 4